Scaffolding Spring Apps for iPhone
This tutorial walks you through the generation of software components for use on the iPhone. This results in a fully implemented ready-to-run iPhone application that can be immediately used for validating and testing the generated iPhone components. Spring scaffolding for iPhone requires a MyEclipse Spring or Bling subscription. In this tutorial, you will learn how to:
- Scaffold from database tables into an existing project
- Deploy the app
- Test in the Mobile Web Simulator
Duration Time: 20 Minutes
Don't have MyEclipse? Download Now
Note: If you get a popup regarding the project compiler compliance level not matching the workspace default, specify that you want to use a custom setting for the project by clicking Yes.
Scaffolding for iPhone requires the same steps as scaffolding with Spring MVC. Follow the steps in Scaffolding a Spring MVC Application with the following exception:
Select the Generate checkbox for iPhone on the Select Web Client Type wizard page.
Note: If you want to use the Spring DSL, then you need enable the project for Spring DSL support prior to scaffolding. See Enabling and Using Spring DSL for more information.
- Right-click the MyEclipse Tomcat server in the Servers view, and select Add/Remove Deployment.
- Select CustomersiPhoneApp in the Available column, click Add, and click Finish.
- Select Mobile>Mobile Web Simulator from the main menu to open the Mobile Web Simulator.
- Enter the following URL in the address bar: http://localhost:8080/CustomersiPhoneApp/.
The iPhone application can be used to list all customers, view customer details, edit customer details, delete customers and add new customers.
To ease your way into code generation with ME4S, this tutorial involved scaffolding from only a single database table. Therefore, only the software components for managing a single entity were generated, and there were no entity relationships. When you start generating for multiple entities, potentially with entity relationships, there are many more software components generated than were generated with this tutorial. Even though there's a lot more code, it is grouped and organized as shown in the following images.