1 / 13

Web Development Methodologies

Web Development Methodologies. Yuan Wang(yw2326). Basic Concepts. Browser/Server (B/S) Structure Keywords: Browser, Server Examples: Websites Client/Server (C/S) Structure Keywords: Client, Server Examples: MSN, Skype. Model-View-Controller(MVC). Basic Process of a B/S application:

zaria
Download Presentation

Web Development Methodologies

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Web Development Methodologies Yuan Wang(yw2326)

  2. Basic Concepts • Browser/Server (B/S) Structure • Keywords: Browser, Server • Examples: Websites • Client/Server (C/S) Structure • Keywords: Client, Server • Examples: MSN, Skype

  3. Model-View-Controller(MVC) • Basic Process of a B/S application: • A user wants to look at a page using a browser.He sends a request to the server, then logical codes on the server begin to execute based on the user’s request. They get some data from database and do some logical execution, then return a dynamic page to the web browser so that the user can see it. • Page: View • Logical Codes: Controller • Model: Database

  4. Technologies in B/S development • Technologies in View tier: • HTML, Javascript(JS), CSS, etc. • JS: A scripting language, using in the browser-side • Libraries: Yahoo User Interface, EXT, Prototype, JQuery • CSS: DIV+CSS instead of <table> • <div id=page class=“decoration”> </div> • Clear, Easier to change an interface apperance

  5. Frameworks • Why it appears • CGI, JSP, ASP Mix 3 tiers together • Simple, easy to learn • Not easy to extend • There are really a lot of frameworks, which one we need to choose?

  6. Frameworks • 1. ASP.NET using C# • Not totally free • 2. Struts in J2EE platform using Java • Difficult, too many codes to write • 3. Some other frameworks using PHP, Perl • Not very powerful

  7. Is there a language and a framework • Free • Easy • Powerful • Python • Python on Django • http://www.djangoproject.com/

  8. Python on Django • Model-Template-View(MTV) • Template: describes how the data is presented • Template: View in MVC • View: describes which data is presented • View: Controller in MVC • URL matches one controller in Django • Other MVC matches one view, such as .asp, .jsp

  9. How to use it • Django-admin.py in Python site-packages • Using django-admin.py startproject newproject to create a directory for your application • Settings.py and urls.py • Settings: configuration file • tell Django where you put your pages in • Template_Dirs = { ./templates } • Helloworld.html---print helloworld--page • Urls: tell Django Server which controller each url matches

  10. How to use it • Create a controller file called Helloworld.py • From django.shortcuts import render_to_response • def index(request): • return render_to_response(“helloworld.html”) • Add it into urls.py: • Urlpatterns= patterns(‘’, • (r’^helloworld/’, ‘newproject.helloworld.index’), • ) • Then when you input http://localhost:8080/helloworld/ • It will match function index in helloworld.py

  11. Test on Django • Start Django Server • In the command line, • C:\python25\newproject>manage.pyrunserver • http://localhost:8080/helloworld/

  12. Remember Multidisciplinary field

  13. Thank You!

More Related