Results 1 to 10 of 10

Thread: what is a framework?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2009
    Posts
    904

    what is a framework?

    what is .net?Its a framework.But what does the term "Framework" means

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: what is a framework?

    To me, Framework basically means the building blocks for creating your application.

    The .Net Framework contains a huge number of classes which on their own do discrete tasks, i.e. open a file, save a file, make an HttpWebRequest etc. You can then take all of the elements within this framework orchestrate them to do something a bit more meaningful, like create a Media Player, or a Word Processor.

    More information here:

    http://en.wikipedia.org/wiki/.NET_Framework

    Gary

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: what is a framework?

    A development framework is basically a set of tools that you can use to simplify development. Instead of interacting with the the system at a low level, the framework handles interaction with the system and then you interact with the framework. You can perform a single task against the framework and it might do a number of tasks against the system that would be much more complex for you to code yourself. A framework won't necessarily cover everything, so there will be times that your code must pass through the holes it contains and interact with the system directly.

    Frameworks might be layered, e.g. the ASP.NET MVC Framework is a a way to build web apps simply against the .NET Framework. You interact with the MVC Framework, which interacts with the .NET Framework, which interacts with the system.

    It's also important to remember that there is far more to the .NET Framework than just its base class library. That is only one aspect of it.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2009
    Posts
    904

    Re: what is a framework?

    This is what i learnt from a google search that an ASP.NET MVC Framework is a web application framework that implements the model-view-controller pattern.

    model is equivalent to a database,view is equivalent to the user interface and controller is equivalent to the server.

    someone please explain me these three terms of MVC clearly.........please help
    Last edited by HowTo; Aug 6th, 2010 at 10:42 PM.

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: what is a framework?

    The database itself is not really the model. It's kind of a separate layer of its own. The model is your app's representation of the data. That data may come from a database or it may not. If you generate a typed DataSet in your project from a database, the typed DataSet is the model. You might also use LINQ to SQL, the Entity Framework, some other ORM tool or even hand code your own entity classes to create your model.

    The view is what the user sees. The view should contain the UI itself and also probably any logic relating specifically to the UI, e.g. formatting, and that's all.

    The controller is basically the business logic of your app. It controls how the model gets to the view. Sometimes the controller will actually pass instances of model classes to the view and others times you will need to craft what's known as a "view model", i.e. a custom chunk of data created specifically to correspond to a view when the model format doesn't directly match the view format.

    In ASP.NET MVC terms, all URLs that the user enters or clicks on in their browser map to an action method in a controller. The controller decides what data is required and gets it from the model. It then creates the appropriate view and passes the data to it. The view will then decide exactly how to display that data. If the user enters or edits data into a form and posts it back to a controller action, the controller will then validate the data if required and, if it passes, send it back to the model to be saved to the original data source.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2009
    Posts
    904

    Re: what is a framework?

    What is the meaning of the term "Business logic" ?

  7. #7
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: what is a framework?

    Business logic is basically what your application does. The data is just data. It sits there being data. The UI displays the data and lets the user enter and edit it. Everything else is business logic: how the data gets used, what is valid and what isn't, etc, etc.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  8. #8
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: what is a framework?

    An simple example of what might on go within your business logic would be something like the following...

    Let's say you store in your database a person's first name and last name. You have fields for this in your database, and these fields are recovered within your data access layer. Now in terms of being usable to the front end, you might need to combine the first and last name, such as:

    Gary Park
    Park, Gary

    Depending on what is required. You are not going to store both of these combinations of the names in the database, as that would be a waste of space. However, in your Business Logic, you might provide properties, or methods, that combine these names for you, on demand, which can then be used within the UI.

    Gary

  9. #9
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

  10. #10

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width