1 / 11

update 1

update 1. TimeTracker 2, Take 1. Servlets. Web Interface ( jsp ). Servlet (business logic and processing). Form Submit. R/W. App Engine Datastore. TimeTracker 2, Take 1. Simple setup turns into “Spaghetti Code”. Web Interface ( jsp ). Servlet (business logic and processing). Form

taber
Download Presentation

update 1

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. update 1

  2. TimeTracker 2, Take 1 • Servlets Web Interface(jsp) Servlet(business logic and processing) Form Submit R/W App Engine Datastore

  3. TimeTracker 2, Take 1 • Simple setup turns into “Spaghetti Code” Web Interface(jsp) Servlet(business logic and processing) Form Submit R/W App Engine Datastore

  4. Spaghetti Code Solution? • MVC • Model, View, Controller • http://www.pnp-software.com/eodisp/images/mvc-original.png • model: stores the data and application logic for the interface • view: renders the interface (usually to the screen) • controller: responds to user input by modifying the model

  5. Which MVC to Use? • Must be: • Be easy to use • Compatible with Google App Engine • Possibilities:

  6. Spring Framework • Which components? • Spring Security • Spring Webflow • Spring Web Services • Spring Roo • Spring Integration • Etc. • Examples use old version and can’t get examples to work with new version

  7. GWT MVC • Would require a switch to Google Web Toolkit for UI • GWT complicated enough without adding another layer on top of it

  8. Play! Framework • Fairly new, but has good support and active developers • Easy to use and setup • Not easiest thing to develop with because requires you to use terminal to deploy • Can’t test Persistence to Google App Engine without Deploying

  9. Play! Architecture http://www.slideshare.net/areelsen/introduction-playframework

  10. Play! Framework in Action 1 • Make a request from a browser /articles/archive?date=08/01/08&page=2 • Router file knows we want to call the function archive in the Articles.java controller file. • archive function can retrieve the date and page values by defining them as parameters to the function. public staticvoid archive(Date date, Integer page) { List<Article> articles = Articles.fromArchive(date, page);render(articles); } Play! uses the method parameter’s static type, to translate the HTTP value into a Java object. • Then, in our view, we can access the articles list of java Articleobjects directly and display them to the user. ... <a href="@{Article.show(article.id)}"> ${article.title}</a> Which generates the following HTML: <a href="/articles/15">My new article</a> … 2 3 3.5 4

  11. Project Status & Timeline • Status: Behind • Integrating MVC into the application architecture • Inability to easily find an MVC that worked nicely with Google App Engine • Timeline • Mid-November • Solid understanding of Play! Architecture and its integration with Google App Engine • Basic Play! Application deployed and working on App Engine • End of November • Basic TimeTracker application functionality implemented • Logging time • Managing Employees, Projects, Clients, etc. • Deployed to AppSpot • End of Semester • Began implementing new functionality

More Related