Web #3: MVC with data
In this class, we're going to modify our Hello World site to show data from the Employee db we just created.
- Introduction
- This is where the fun begins.
- In the real world, it's not about fancy websites.
- What is an application?
- Data-driven websites. Should be able to view or edit data.
- Manages company data and should make your job easier.
- Public facing vs internal sites. In a corporate world, they are usually internal (behind a firewall).
- So many technologies to choose from. No wrong answer.
- What is a STACKA group of technologies usually paired to build an app from start to finish.? A Microsoft .NET stack uses ASP.NET, a JavaScript framework, SQL Server and IIS.
- Do your research. Job market will be different based on what you choose to learn.
- What is a Full-Stack Developer?
- In today's tech industry, you can't just be good at one thing.
- So what if you know how to design websites. The next guy applying for the job also knows how AND knows how to code.
- As a full-stack developer, you will help design the solution and recommends which technologies to use.
- A company doesn't want to hire different people to do these things:
- UI (User Interface, the look and feel). Not a programmer.
- UX Designer (User Experience). Also not a programmer.
- Front-End Developer. A real programmer that is in charge of taking the data and making it look nice on the site.
- Middle-layer developer (C#). Expose data to the front-end. Also creates web services for other systems that need your data.
- Back-end developer (SQL). Also helps with data security, creates views, stored procedures.
- IIS administrator. Web hosting and security.
- In Visual Studio, open the MVC project that we created. Let's discuss these roles:
- Let's build our first MVC site that shows data.
- When opening a page, the <page name>Controller is called, starting with Index(). See RouteConfig.
- Create a connection to the database, pass SQL and get data. Many steps involved here.
- Save data to an objectA multi-dimensional data structure, such as a List. using a Model
- Go back to the View page (.cshtml page), along with the object (or data).
Return View(tempObject)
- In the View, display the data in an html table.
- Go to the next lesson - JavaScript Frameworks / Angular part 1