edit-task
Home
Up
Delete
Task Name:
Task Description:
5050 - learning the msft asp.net MVC framework for developing web applications.
TaskGroup ID:
Start Date:
Start Time:
Duration:
Priority:
Status:
To Do
Completed
In Process
Add Photo:
Owner ID:
Content:
use HTML
Edit Content
<h1 style="text-align: center;">mvc app1 => guide asp.net mvc</h1> <h2>[WHAT]</h2> <ol> <li>] asp.net mvc demo app</li> <li>]</li> </ol> <h2>[WHY]</h2> <ol> <li>] learn/teach the msft asp.net mvc framework</li> <li>] resources</li> <li>] tutorials</li> </ol> <h2>[WHERE]</h2> <ol> <li>] aspnet-MVC.sospep.com -</li> </ol> <h2>[WHEN]</h2> <ol> <li>] 2015-07-dd</li> </ol> <h2>[EXAMPLE]</h2> <ol> <li>] </li> </ol> <h2>[HOW-TO]</h2> <ol> <li><strong>] </strong></li> </ol> <h2>[REFERENCE]</h2> <ol> <li>] SUMMARY-VIDEO-COURSE intro-to-mvc - SRC=a mva course Jon Galloway, Christopher Harrison</li> <li>] SUMMARY-ARTICLE-SERIES migrating from web pages to mvc - a 3 part series - SRC=mikesdotnetting.com, mike Brind</li> <li>] SUMMARY-ARTICLE-SERIES getting-started-with-MVC -SRC=asp.net, Rick Anderson</li> <li>] SUMMARY-VIDEO-COURSE # 5373 - Entity Framework -</li> <li>]</li> </ol><hr /> <h1 style="text-align: center;">developer implementation</h1> <h2>[process]</h2> <ol> <li><strong>[] building your first asp.net MVC app - in (8) steps</strong></li> <ol> <li>x] > vs studio installed</li> <li>x] > create your first project</li> <li>] DATA-1 - connect to an existing db</li> <li>] DATA-2 - create a new db using EF ( code first ) </li> <li>] DATA-3 - use an existing db with EF ( db first ) </li> <li>] testing - unit, operational</li> <li>] deploying -</li> <li>] next == /test deployment, /iteration, /</li> </ol> <li><strong>[] LIST sample demo 1</strong></li> <ol> <li>] new project -</li> <li>] add model -</li> <li>] add controller - </li> <li>] add view -</li> <li>]</li> </ol> <li><strong>[demo 2]</strong></li> <ol> <li>] get data from db</li> <li>] display data from db</li> </ol></ol> <h2>[notes]</h2> <ol> <li><strong>] have Y</strong></li> <li><strong>[] DESIGN my app (guide mvc.*)</strong></li> <ol> <li><strong></strong>> IPO = x] Home, x] Questions, ] Lessons, ] Resources, x] About, x] Contact</li> </ol> <li><strong>QUIZ app </strong></li> <ol> <li>] questionsController</li> <li>] questionsModel</li> <li>] questionsView</li> <li>] answers</li> <li>] users</li> <li>] scores-results</li> </ol> <li><strong>VIEWS - </strong></li> <ol> <li>] list quizzes[]</li> <li>] display list-questions(quiz)</li> <li>] submit-question-answers <- display list-questions(quiz)</li> <li>] check-answers</li> </ol> <li><strong>[your DATA decision]</strong></li> <ol> <li>] chances are your going to be working with some form of data and the need to persist(store) that data. There are a couple of main DATA scenarios to consider </li> <li>] OPTION 1 - using an existing DB - commando - aka getting data out of and putting it back into an existing SQL database. </li> <li>] OPTION 2 - using an existing DB wih EF db first -</li> <li>] OPTION 3 - creating a new DB for the project using EF code first -</li> </ol> <li><strong>] guideMVC ( gig13), CONTENTS</strong><ol> <li>] summ introMVCseries, ] summ entityFramework series ] other (rick anderson art, m brind art migrating )</li> <li>] app guideMVC - ] q+a interview, quiz ] lessons / tutorials ] resources </li> <li>] lessons - ] add controllers, ] add model, ] add view ] routes ( controller/action/parameter) ] getting the model data into controller ] passing the model data to the view ] accessing the model data in the view, ] my model ( question, answer )</li> </ol></li> </ol> <h2>[by_date]</h2> <ol> <li>] SUMMARY</li> <ol> <li>] v-001 -</li> <li>] v-002 -</li> </ol></ol><hr /> <h1 style="text-align: center;">status</h1> <h2>[previously]</h2> <ol> <li><strong>[PLAN] build an example/sample/demo app</strong></li> <ol> <li>] # # ADD page - Questions</li> <li>+] project -</li> </ol> <li><strong><span style="background-color: #888888;">[2015-mm-dd]</span>[00:00] build new project using MVC template</strong></li> <ol> <li>] # # -</li> <li>*] had existing MVC1 project, I used that, think it uses an older version of the MVC template</li> </ol> <li><strong>[00:00] NEW task</strong></li> <ol> <li><strong>x] # # - UPDATE</strong> about page - add my about info</li> <li>x] replace "example content data" on "about" page by editing "about" view in directory /views/home</li> </ol> <li><strong>[00:00] NEW task </strong></li> <ol> <li>x] replace "example content data" on "contact" page by editing "contact" view</li> <li><strong>x] # # - UPDATE</strong> contact page - add my contact details</li> </ol> <li><strong>[00:00] NEW task </strong></li> <ol> <li><strong>x] # # TEST -</strong> register user function = PASS, added user: tester pw: password</li> </ol> <li><strong>[00:00] NEW task IN</strong></li> <ol> <li>x] UPDATE layout page - add menu option for Questions page</li> </ol> <li><strong>[00:00] NEW task IN</strong></li> <ol> <li>x] UPDATE add - to siteLayout - menu item for "questions"</li> </ol> <li><strong>] NEW task IN </strong></li> <ol> <li>] CREATE add "model" - class = questions</li> </ol> <li><strong>] NEW task IN </strong></li> <ol> <li>] CREATE add "model" - class = answers</li> </ol> <li><strong>[00:00] NEW task IN </strong></li> <ol> <li>x] UPD add to homeController - method "questions" for return questions view</li> </ol> <li><strong>[00:00] NEW task IN </strong></li> <ol> <li>x] CREATEd - view - questions IN /views/home directory</li> </ol> <li><strong><span style="background-color: #888888;">[2015-07-12]</span>[00:00] NEW task IN </strong></li> <ol> <li>] TRY add controller - using scaffolding - to generate Controller and Views ( based upon given Model )</li> </ol> <li><strong>[00:00] NEW task IN</strong></li> <ol> <li>] added controller - questions - using "scaffolding"</li> <li>] UPD - questions class to add dbcontext</li> </ol> <li><strong>[00:00] NEW task IN - EF - create db using</strong></li> <ol> <li>x] # # - generate a database - using ef<strong> </strong></li> <li>*] some notes ON "adding connection string to web.config," also says you dont have to</li> <li>x] SRC=tutorial Rick A. # 1 -</li> </ol> <li><strong>[00:00] NEW task IN </strong></li> <ol> <li><strong>x] # # - ADDed the model class(Movies)</strong></li> <li>x] copy and paste class from tutorial into new class file</li> <li>x] BUILD ( otherwise next step will throw error ... )</li> </ol> <li><strong>[00:00] NEW task IN </strong></li> <ol> <li><strong>x] # # - ADDed a controller (using scaffolding) for Movies - x]</strong> right click - add controller , x] choose controller type = mvc with read/write and EF, x] choose model = movie, x] choose dbContextClass =contextMovies</li> <li>* ] SWEET - essentially you just create the model file, this one has 2 classes(movie + movieDBcontext), and everything else(controller, views) was auto generated with the scaffolding</li> <li>*] RESULT - browse to /movies - has index file, no content, x] Create - add a record PASS, x] Edit record - PASS, ] Delete record - x] Everything tested works fine. TEST Shut down the app. Restart and data is persisted</li> <li>?] BUT - still dont see any kind of db (*.mdf file) in the AppData directory</li> <li>x] ACTUALLY - it (the db) was there, YOU NEED TO click the "Show all files" button on the "Solutions Explorer" window menu</li> </ol> <li><strong>[00:00] NEW task IN </strong></li> <ol> <li><strong>x] # # - TRY - build question.cs AS PER movies.cs </strong></li> <li>x] model - add 2nd db context class to the existing questions class,</li> <li>x] BUILD pass</li> </ol> <li><strong>[00:00] NEW task IN</strong></li> <ol> <li><strong>x] # # - add a controller </strong><strong>(using scaffolding) for Questions.cs </strong><strong> </strong>x] NO option to "Add controller" b/c REMEMBER to right click "Controllers" folder, NOT the Model file or Models folder - duhhhh</li> <li>x] <a href="http://stackoverflow.com/questions/10540198/context-menu-to-add-controller-view-missing" target="_blank">http://stackoverflow.com/questions/10540198/context-menu-to-add-controller-view-missing</a> </li> <li>x] PRB - ERROR - about no key defined in Answer, questions class contains a list of Answers, REM out line</li> <li>x] BUILD =pass,</li> <li>x] TEST = pass</li> </ol> <li><strong>[00:00] NEW task IN </strong></li> <ol> <li><strong>x] # # - UPDATE-PAGE- layout - </strong>x] lets point the "Questions" link on the main menu in layout, to the new Questions index page VS the orig. Questions.cs page,</li> <li>x] removed the original Questions.cs from the project, * file still exists in phyical directory</li> </ol> <li><strong><span style="background-color: #888888;">[2015-07-17]</span>[00:00] NEW task IN</strong><ol> <li><strong>i] # # RENAME sln</strong> - FROM: default:MVCapplication1 TO: guide-MVC</li> <li>x] use find and replace to replace all occurences,(##), manually walk through each replacement</li> <li>x] there is a lot of occurences</li> </ol></li> <li><strong>[00:00] PRB - 33 errors (</strong> apparently: hyphen/dash doesnt work as a name for namespace OR ???</li> <ol> <li>x] renamed FROM: guide-MVC, TO: guideMVC</li> <li>x] use find + replace (43 occureneces)</li> <li>x] TEST = build</li> </ol> <li><strong>[00:00] PRB - missing data (prev ) from questions doesnt seem to be there</strong></li> <ol> <li>x] TRY - add some more data - see what happens, data adds OK, displays OK, where is it stored ? ( no NEW dbs added )</li> <li>x] TRY - RENAMED "aspnet-MvcApplication1-2013-nnnnnnn" AS guideMVC.Models.Questions ( as per dbContext naming format)</li> <li>x] TEST = build, PASS</li> </ol> <li><strong>[00:00] NEW task</strong></li> <ol> <li>x] # # - DATA-decision - OPTIONS ] exisiting db(mysql) direct ] new db() using EF (code first), ] existing db() </li> </ol> <li><strong>[00:00] NEW task</strong></li> <ol> <li>x] # 5375 - 1] existing db(mysql) - x] ADD connection to mysql db - x] ADD Location model x] ADD Location Controller x] ADD Location View ] TEST = PASS </li> </ol> <li><strong>[00:00] NEW task</strong></li> <ol> <li>i] FIX-PRB-5380 - no bootstrap</li> </ol> <li><strong><span style="background-color: #888888;">[2015-07-18]</span> UPDATE task </strong></li> <ol> <li>x] FIX-PRB-5380 - no bootstrap</li> <li>] redesign EXISTING pages for bootstrap - including ] menu ]</li> </ol></ol> <p> </p> <h2>[currently]</h2> <ol> <li>] passing data from the model into the view</li> <li>] accessing data from the model in the view</li> </ol> <h2>[next]</h2> <ol> <li><strong>] ADD - Resource - tutorial</strong></li> <ol> <li>] <a href="http://www.dotnetcurry.com/aspnet-mvc/1124/aspnet-mvc-bootstrap">http://www.dotnetcurry.com/aspnet-mvc/1124/aspnet-mvc-bootstrap</a> - builds app</li> </ol> <li><strong>] ADD - Resourse - course </strong></li> <ol> <li>] udemy SRC=art on using with mysql on codeproject</li> </ol></ol> <p> </p> <p> </p> <p> </p> <hr /><ol> <li>> + "using nameSpace.Models.{model}" to get access to models in the controller ( HomeController ), my ex creates new instance of Question object</li> <li>> + "@model nameSpace" TO: /views/{viewName}</li> <li>> use "@Model.{property} - TO: WHY: access the property values of the model passed into the view</li> <li>></li> <li>> use EF seed function - to "new up" a bunch of data || controller new Question q</li> <li>></li> </ol><hr /> <p> </p> <p>- ] display result</p> <p> <br />] g q= "guide asp.net mvc"<br />"guide aspnet mvc"<br />] alt q (g suggested) = asp.net beginners guide, manual study mvc4 guide</p> <p>EXAMPLE APP =</p> <p>- questions - add, - edit, -delete</p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p>