Changes for page Your First Framework
Last modified by Steve Peery on 2012/08/09 05:08
From version 6.1
edited by Pascal Robert
on 2012/08/09 05:08
on 2012/08/09 05:08
Change comment:
Migrated to Confluence 5.3
To version 3.1
edited by Pascal Robert
on 2012/01/07 21:35
on 2012/01/07 21:35
Change comment:
There is no comment for this version
Summary
-
Page properties (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Parent
-
... ... @@ -1,1 +1,0 @@ 1 -Getting Started - Tags
-
... ... @@ -1,1 +1,0 @@ 1 -tutorials - Content
-
... ... @@ -1,4 +1,4 @@ 1 -{{toc/}} 1 +{{toc}}{{/toc}} 2 2 3 3 = Introduction = 4 4 ... ... @@ -7,16 +7,16 @@ 7 7 When a framework is built (with Ant or Maven), the structure is like this: 8 8 9 9 MyStuff.framework 10 - ~-~-> Resources11 - ~-~-> Info.plist12 - ~-~-> Java13 - ~-~-> mystuff.jar14 - ~-~-> some-third-party.jar15 - ~-~-> MyEOModel.eomodeld16 - ~-~-> Properties17 - ~-~-> WebServerResources18 - ~-~-> someimage.png19 - ~-~-> somestyling.css10 +-> Resources 11 +~-~--> Info.plist 12 +~-~--> Java 13 +~-~-~-~--> mystuff.jar 14 +~-~-~-~--> some-third-party.jar 15 +~-~--> MyEOModel.eomodeld 16 +~-~--> Properties 17 +-> WebServerResources 18 +~-~--> someimage.png 19 +~-~--> somestyling.css 20 20 21 21 So why using frameworks? Simple: to be able to use them in more than one project. Putting your EOModel into a framework is a good idea since you can built many different projects for the same business logic. 22 22 ... ... @@ -34,9 +34,9 @@ 34 34 35 35 = Linking the application with the framework = 36 36 37 -If you go back to the **BlogRest** project, you will see compilation errors. We need to link the application project with the framework project. To do so, right-click on the **BlogRest** project, and select **Build Path** -> **Configure Build Path**. 37 +If you go back to the **BlogRest** project, you will see compilation errors. We need to link the application project with the framework project. To do so, right-click on the **BlogRest** project, and select **Build Path** -> **Configure Build Path**. 38 38 39 -Click the **Libraries** tab, and you will see the list of Java archives (.jar) and Project Wonder frameworks. 39 +Click the **Libraries** tab, and you will see the list of Java archives (.jar) and Project Wonder frameworks. 40 40 41 41 To add **BlogCommon** to the build path (aka the class path), click on **Add Library**. 42 42 ... ... @@ -44,8 +44,8 @@ 44 44 45 45 You will see a list of all frameworks that you can add to your project. Check **BlogCommon** in the list and click **Finish**. Click **OK** in the **Properties** window to go back to the main Eclipse window. 46 46 47 -You can see that all compilation errors are now gone. The next thing we need to do is to link the H2PlugIn with the **BlogCommon** framework. Why? Because since we moved the database model to the framework, the framework needs the JDBC plugin included in the H2PlugIn in its build path. To do so, right-click on the **BlogCommon** project, and select **Build Path** -> **Configure Build Path**. 47 +You can see that all compilation errors are now gone. The next thing we need to do is to link the H2PlugIn with the **BlogCommon** framework. Why? Because since we moved the database model to the framework, the framework needs the JDBC plugin included in the H2PlugIn in its build path. To do so, right-click on the **BlogCommon** project, and select **Build Path** -> **Configure Build Path**. 48 48 49 49 Click the **Libraries** tab, and you will see the list of Java archives (.jar) and Project Wonder frameworks. Click on **Add Library**, select **WebObjects Frameworks** and click **Next**. Select **H2PlugIn**, click on **Add Library**. Close the **Properties** window to go back to the main Eclipse window. 50 50 51 -You can run the **BlogRest** application and everything will work. By moving the EOModel to the framework, you will be able to use the model in the next tutorial: [[building a DirectToWeb application to manage the blog>>doc:Your First D2W Project]].51 +You can run the **BlogRest** application and everything will work. By moving the EOModel to the framework, you will be able to use the model in the next tutorial: building a DirectToWeb application to manage the blog.