Search the Community

Showing results for tags 'mvc'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 5 results

  1. i want to know about difference between model and entity. because these word is so close and i am confused.
  2. I am very new to mvc field in PHP, so i am going to start cakePhP so i need some tutorials or videos, materials like can any one give suggestions and easy tips to learn cake php...
  3. Using the .NET MVC tutorial, I noticed on http://www.w3schools.com/aspnet/mvc_layout.asp that the first code block needs updated. I believe It should be <!DOCTYPE html><html> <head> <meta charset="utf-8"/> <title>@ViewBag.Title</title> <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" /> <script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"> </script> <script src="@Url.Content("~/Scripts/modernizr-2.5.3.js")"> </script> </head> <body> <ul id="menu"> <li>@Html.ActionLink("Home", "Index", "Home")</li> <li>@Html.ActionLink("Movies", "Index", "Movies")</li> <li>@Html.ActionLink("About", "About", "Home")</li> </ul> <section id="menu"> @RenderBody() <p>Copyright W3schools 2012. All Rights Reserved.</p> </section> </body></html> to match the updated jquery and modernizr files. Additionally, the "font" line in the other code block on that page should, if I am correct, be changed to "font-family" (And it would be nice on this page: http://www.w3schools.com/aspnet/mvc_views.asp to differentiate between "add to what's already in the file" and "switch with what's already in the file") Could someone with access to do so please update this?
  4. IntroductionSo I finally decide to have a go with this idea of having a project blog I'm really bad at this sort of thing and often find my self working for hours not writing a single line of comment to my code.. I don't find it necessary cause my naming often tells what it does so I don't see the point typing out the same thing the name says. But maybe I just lake the guide lines of typing comments.. read once that if you have to think twice about what a code you written does you need a comment for it. I will be doing a MVC pattern system. I've already started with this project so the first post will be covering what I've done so far. I encourage to comment any spelling or miss use of words since English isn't my main language and it would be good to get some improvements.To be clear the questions I have in my post are meant for me and I don't expect on you answering them for me. So who am I? Well I'm Andreas, I've been a member since 2008 I know I'm not the most active user I usually ask questions to small thing I don't now how to search for or then I just got completely stuck at some code error. Lets get started.So to get things in motion I'm using a class I call a Mapper class and it's task is to register paths to a controller and method. I get the path from the global $_SERVER['PATH_INFO'] variable which takes everything after "index.php" so "index.php/blog/posts/entry" would be "/blog/posts/entry". I had no intention of having any SQL queries into this class but I soon realized that I had to have a "registerMap" method to the class so I could set paths from a controller or model classes.Only problem with using this mapper method is that I can't do pages like "blog/posts/entry/page/2" in the path so they are set as normal get keys. From the index file I define paths to various places including a web root which defines the index file location compared to the server root. This is good in case you want to put this code into a sub folder. The template engine i choose to use is Smarty, you can find it at http://smarty.net, I just find it easy to use. My abstract Controller class extends the Smarty class so I can set the data form the Controller class. I added a function to tell what template folder I want to use in my view directory.Another neat thing I did was to make a plugin for Smarty what inserts the CSS files to the head so I get less request to the server. I will change that later to handle JavaScript files too. I also have a ActiveUser class that handles the current user on the site. I like this class a lot cause of the way I use sessions with it. Since we aren't allowed to throw cookies at our visitor without any permission this class only starts the session if the session cookie is set and the cookie is only set then you login on the page. I mostly like this cause I've seen complains about just this problem then reading about that new law about cookies. I think that covers the basic introduction of that I've done without going into detail of the exact code looks like to the point there I'm now. The next step is to add an admin panel where I can add and remove users. And change settings to other component. Current issueSo this is about how I handle the users which isn't the active one like say I'm logged in and i want to change someone else user type. How should I get that object in the code.At the moment I can fetch users from the ActiveUser class but this feels wrong. Cause it's not within the task that is set for the ActiveUser class. So what I think the ActiveUser should handle is hold the current user id and type and have the responsibilities to create/update/remove users. (maybe change password and type for the current user but it feels like that should be in the User class)The User class extends the Person class and contains only one extra property which is the user type.Why I choose to not have the user name in the User class is cause I hashed the user name making it more time consuming if the database got out. I also written an abstract class for collections the idea is that the class could sett properties like limit the number of objects which would be returned or the sorting order of the query "ASC and DESC" (Maybe a random order would be a great thing to add). Problem with this Collection class is that it's not fully thought through. I've written some code that uses the concept but I find my self doing the same code over and over again mostly the only thing that is different is the query to the database unless the object has child objects to be loaded. I'm sure that I should get the users from a collection class i just don't know how to complete this collection class at the moment cause the case scenarios are too many. One example is that i can load a user from the user collection but since the user is a part of a person. The person data must be loaded to the object too. Question is should I add some sort of property in the person collection class to get the query for that specific table so I can add it to my object. Also what if the object I extends has child objects and how do get them, a public method for getting that particular property data set from that person. Well I think this will be all for this time.. hope this wasn't too confusing.
  5. How to implement mvc architecture in js? i have read some stuff regarding this but still having problem to get its implmention.I will be glad if anyone can elaborate it with small example.