rock chms dev workshop 101
DESCRIPTION
Rock ChMS Dev Workshop 101. Setting up your dev environment. Nick Airdo Señior Developer Central Christian Church AZ ( Cccev ) Email: [email protected] Twitter: @ airdo. Setting up your dev environment…. From scratch. http://bit.ly/WebP I 4. Use Web P I 4.0 - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/1.jpg)
#RefreshCache
Rock ChMS Dev Workshop 101
Setting up your dev environmentNick Airdo
Señior DeveloperCentral Christian Church AZ (Cccev)
Email: [email protected]: @airdo
![Page 2: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/2.jpg)
FROM SCRATCHSetting up your dev environment…
![Page 3: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/3.jpg)
http://bit.ly/WebPI4
• Use Web PI 4.0• Add “Visual Studio Express 2012
for Web”– Not “F# Tools for Visual Studio Express 2012
for Web”
• It comes with SQL Express LocalDB Edition
• Then, Install• You’ll get it all…but it will take a
LONG time.
![Page 4: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/4.jpg)
Side Note: SQL Express 2012 LocalDB• Small installer. The 32-bit version has 28.2 MB
and the 64-bit version has 33.7 .• Simplified Installation. It does do not require
configuration or administration.• Run as a low privileged user.• Offers the same T-SQL language as SQL Server
Express. It supports stored procedures, geometry and geography data types, triggers, views.
• LocalDB uses the same sqlservr.exe as other editions of SQL Server and the same client-side providers.
• LocalDB doesn't create any database services; LocalDB processes are started and stopped automatically when needed.
• LocalDB connections support AttachDbFileName property, which allows developers to specify a database file location (if desired)
• One LocalDB installation for all users on a computer.
• Familiar to developers using SQL Server Compact.
• It works with ASP.NET• It supports XML (XQuery, XPath) and BLOB.• It supports ADO .NET Sync Framework• It supports LINQ.• It supports distributed transactions.• Unlimited local connections.
From http://blogs.msdn.com/b/sqlexpress/archive/2011/07/12/introducing-localdb-a-better-sql-express.aspx and http://sqlcoffee.com/SQLServer2012_0004.htm
![Page 5: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/5.jpg)
…waiting…
![Page 6: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/6.jpg)
GitHub• Create a free GitHub
account* if you don’t have one yet
• You’ll use it in a little bit…
* Don’t forget your password.
![Page 7: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/7.jpg)
Go Fork Rock-ChMS• Seriously, it’s not as bad as it might sound• Go to https://github.com/SparkDevNetwork/Rock-ChMS
• Click Fork
![Page 8: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/8.jpg)
One click install!
• Finish• Then Exit.
![Page 9: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/9.jpg)
INSTALLING GIT TOOLSSource control is your friend.
![Page 10: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/10.jpg)
Download msysgit• http://bit.ly/DownloadMsysGit
• Will be used by SmartGit
![Page 11: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/11.jpg)
Install msysgit• Run the installer• Use the defaults
![Page 12: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/12.jpg)
Download SmartGit• An easy-to-use, free*
GUI for Git
* For non-commercial use license
![Page 13: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/13.jpg)
Setup SmartGit• License Agreement
– Next• Type of Usage
– Choose “Non-commercial use only”
– Next
![Page 14: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/14.jpg)
Git Executable• If you installed msysgit,
it should pre-fill this line
• Next
![Page 15: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/15.jpg)
User Information• Recommend using your
GitHub account information…
• …but your real GitHub account goes on the next screen…
![Page 16: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/16.jpg)
Hosting Provider
…right over there.
![Page 17: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/17.jpg)
Master Password• Read• Do
![Page 18: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/18.jpg)
SmartGit Installed• Finish
![Page 19: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/19.jpg)
Cloning is not Illegal• You’re making a
duplicate copy of your Forked Rock repository (origin) to your local system
• Ok
![Page 20: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/20.jpg)
Your Rock-ChMS Git
![Page 21: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/21.jpg)
Local Directory• C:\Rock-ChMS• or whatever you prefer• Next, then Finish• Then wait while the
data is pulled from the origin repo…
![Page 22: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/22.jpg)
SmartGit Config• Recommend you
unselect this one• If selected, unchanged
files will be shown
![Page 23: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/23.jpg)
Change Branch• Following the gitflow*
model, we’re developing in the “develop” branch
• Branch->Branch Manager– Select origin/develop– Switch To…
* http://nvie.com/posts/a-successful-git-branching-model/
![Page 24: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/24.jpg)
Almost There…• Open your C:\Rock-ChMS\
Rock.sln• Go fetch a VS Product key
![Page 25: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/25.jpg)
Don’t Worry*• If you see this… just press OK
* You won’t be monkeying with the Rock Scheduler Service anyhow.
![Page 26: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/26.jpg)
ROCK DEVELOPMENT 101Develop on a Rock foundation
![Page 27: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/27.jpg)
Turn on your Package Manager Console
![Page 28: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/28.jpg)
Make sure your Default project
is “Rock”
![Page 29: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/29.jpg)
Add a web.connectionStrings.config
to your RockWeb project
![Page 30: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/30.jpg)
web.connectionStrings.config
![Page 31: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/31.jpg)
The Password Is…
<connectionStrings> <add name="RockContext" connectionString="Server=(localdb)\v11.0;Integrated Security=true;MultipleActiveResultSets=true" providerName="System.Data.SqlClient" /> </connectionStrings>
• For SQL Express LocalDB put this into the web.connectionStrings.config
<connectionStrings>
<add name="RockContext" connectionString="Data Source=localhost;Initial Catalog=RockChMS;
User Id=RockUser; password=your-rock-db-user-password;MultipleActiveResultSets=true"
providerName="System.Data.SqlClient" />
</connectionStrings>
• If using other SQL, then use:
![Page 32: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/32.jpg)
Update-Database• In the PMC, run “Update-Database”
![Page 33: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/33.jpg)
F5
![Page 34: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/34.jpg)
If…
![Page 35: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/35.jpg)
…Then• Uncheck this if you
get authentication popup when you F5
• Right-click RockWeb ->Property Pages
![Page 36: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/36.jpg)
Success!
![Page 37: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/37.jpg)
More? Go to the Wiki• Warning: We’re currently moving from gh-pages
(Word/PDFs) to a GitHub-backed-Wiki• Warning: Rock has undergone frequent refactoring• Developer Starting Point
– http://sparkdevnetwork.github.com/Rock-ChMS • Rock Wiki
– https://github.com/SparkDevNetwork/Rock-ChMS/wiki
![Page 38: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/38.jpg)
Git Basics• A few things to get you going:– Pull– Merge– Push
• You’ll learn more about Git during an RC session this week• Pull Requests (in GitHub) – a way to submit your valuable,
cool code to the core team
![Page 39: Rock ChMS Dev Workshop 101](https://reader036.vdocuments.us/reader036/viewer/2022062400/5681690a550346895de01f73/html5/thumbnails/39.jpg)
References• SQL Server 2012 Express LocalDB
http://msdn.microsoft.com/en-us/library/hh510202.aspx • Git Book
http://git-scm.com/book• Rock-ChMS Developer Starting Point
http://sparkdevnetwork.github.com/Rock-ChMS/