Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "TimeTracker 2, Take 1  Servlets Web Interface (jsp) Servlet (business logic and processing) App Engine Datastore Form Submit R/W."— Presentation transcript:

1

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

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

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 2. Router file knows we want to call the function archive in the Articles.java controller file. 3. archive function can retrieve the date and page values by defining them as parameters to the function. public static void archive(Date date, Integer page) { List articles = Articles.fromArchive(date, page); render(articles); } Play! uses the method parameter’s static type, to translate the HTTP value into a Java object. 4. Then, in our view, we can access the articles list of java Article objects directly and display them to the user.... <a href="@{Article.show(article.id)}"> ${article.title} Which generates the following HTML: My new article … 1 2 3 4 3.5

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


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

Similar presentations


Ads by Google