From: Eric C. <ecr...@us...> - 2006-09-17 17:31:55
|
User: ecrutchfield Date: 06/09/17 10:31:55 Added: andromda-aspdotnet/src/site/resources/images/org/andromda/test controllers.gif back-end.gif other-content.gif deferring-param-ctrl.gif online-store-table.gif event-parameters.gif inter-usecase-target.gif custom-code.gif decision-points.gif final-states.gif security.gif use-cases.gif page-variables.gif inter-usecase-source.gif session-objects.gif deferring-param.gif action-states.gif initial-states.gif andromda-aspdotnet/src/site/resources/images/org/andromda/test/screenshots thumb3.gif thumb4.gif thumb2.gif screen2.gif screen1.gif screen4.gif thumb1.gif thumb5.gif screen3.gif screen5.gif andromda-aspdotnet/src/site/axdoc config.xml samples.xml index.xml howto11.xml howto10.xml howto.xml installation.xml howto1.xml howto3.xml Building.xml user-guide.xml project.xml howto9.xml faq.fml howto2.xml howto4.xml howto6.xml .cvsignore howto7.xml howto5.xml m2settings.xml tips.xml howto8.xml andromda-aspdotnet/src/site/resources/howto HowToModel.xml.zip andromda-aspdotnet/src/site/resources/images Generate_app.png andromda-aspdotnet/src/site site.xml Log: initial version Revision Changes Path 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/controllers.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/back-end.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/other-content.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/deferring-param-ctrl.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/online-store-table.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/event-parameters.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/inter-usecase-target.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/custom-code.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/decision-points.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/final-states.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/security.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/use-cases.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/page-variables.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/inter-usecase-source.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/session-objects.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/deferring-param.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/action-states.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/initial-states.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/screenshots/thumb3.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/screenshots/thumb4.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/screenshots/thumb2.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/screenshots/screen2.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/screenshots/screen1.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/screenshots/screen4.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/screenshots/thumb1.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/screenshots/thumb5.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/screenshots/screen3.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/screenshots/screen5.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/axdoc/config.xml Index: config.xml =================================================================== <?xml version="1.0" encoding="UTF-8"?> <document> <properties> <author email="ecr...@us...">Eric Crutchfield</author> <title>AndroMDA - ASP.NET - Configuration</title> </properties> <body> <section name="Adding aspdotnet Cartridge to an Existing Project"> <p> These instructions are for those who have an existing project and want to add support for generating aspdotnet cartridges. You'll need to add a Maven dependency and some properties to your POM, as well as a 'namespace' section to your andromda.xml file. The following sections provide the necessary information to configure these items. </p> </section> <section name="Maven Configuration"> <p> You must add a dependency for the aspdotnet cartridge to your POM to generate ASP.NET applications. The dependency should go in your <code><![CDATA[${project.basedir}/mda/pom.xml]]></code> file. </p> <p> The dependency is as follows. <source language="xml"><![CDATA[ <dependency> <groupId>org.andromda.cartridges</groupId> <artifactId>andromda-aspdotnet-cartridge</artifactId> <version>1.0-SNAPSHOT</version> </dependency> ]]> </source> </p> </section> <section name="Andromda Configuration"> You'll need to add the required namespace properties to your <code><![CDATA[${project.basedir}/mda/conf/andromda.xml]]></code> file. These properties are defined in detail on the <a href="Namespace.html">Namespace</a> page. For each element, enter the value as appropriate. <p> <source language="xml"><![CDATA[ <namespace name="aspdotnet"> <properties> <property name="web">${project.build.sourceDirectory}/../../../../web</property> <property name="web_generated">${project.build.sourceDirectory}/../../../../web/target/src</property> <property name="web_manual">${project.build.sourceDirectory}/../../../../web/src/main</property> <property name="webAssemblyName"></property> <property name="dotNetVersion">2.0</property> <property name="AssemblyTitle"></property> <property name="AssemblyDescription"></property> <property name="AssemblyConfiguration"></property> <property name="AssemblyCompany"></property> <property name="AssemblyProduct"></property> <property name="AssemblyCopyright"></property> <property name="AssemblyTrademark"></property> <property name="AssemblyCulture"></property> <property name="AssemblyVersion">1.0.*</property> <property name="AssemblyDelaySign">true</property> <property name="AssemblyKeyFile"></property> <property name="AssemblyKeyName"></property> </properties> </namespace> ]]> </source> </p> </section> </body> </document> 1.1 cartridges/andromda-aspdotnet/src/site/axdoc/samples.xml Index: samples.xml =================================================================== <?xml version="1.0" encoding="iso-8859-1"?> <document> <properties> <author email="wo...@an...">Wouter Zoons</author> <title>AndroMDA - Bpm4Struts - Samples</title> <gennews>no</gennews> </properties> <body> On this page you will find some samples generated by bpm4struts, you are able to download both UML models and web application bundles. <a name="online-store"/> <section name="Samples"> <h3>Online-store</h3> <p class="std"> This sample is the one explained in the how-to, take a look at the model in the <a href="http://team.andromda.org/maven/andromda/distributions/">binary distribution</a>, you will find it in <code>/samples/online-store/mda/src/uml/online-store.xml.zip</code>; you will be able to build a deployable .ear bundle from there (you will need to have <a href="http://maven.apache.org/">Maven</a> installed to build, and <a href="http://www.jboss.org">JBoss</a> to be able to deploy). </p> <p class="std"> In order to get the most out of this sample you should take note of the following points: </p> <p class="std"> <ul> <li>Any web container able to deploy EAR bundles should work.</li> <li>Point your browser to the following URL: <a href="http://127.0.0.1:8080/OnlineStore/" target="_blank"> http://127.0.0.1:8080/OnlineStore/</a> </li> </ul> </p> <p class="std"> Follow this link to see this sample application running, what you will see is purely generated from UML using bpm4struts, no manual implementation has been added. <ul> <li> <a href="http://team.andromda.org/OnlineStore/" target="_blank"> http://team.andromda.org/OnlineStore/</a> </li> </ul> </p> </section> </body> </document> 1.1 cartridges/andromda-aspdotnet/src/site/axdoc/index.xml Index: index.xml =================================================================== <?xml version="1.0" encoding="iso-8859-1"?> <document> <properties> <author email="ecr...@us...">Eric Crutchfield</author> <title>AndroMDA - ASP.NET - Introduction</title> </properties> <body> <section name="Abstract"> <p class="abstract"> These pages describe the 'aspdotnet' cartridge. The purpose of this cartridge is to generate ASP.NET web pages from an input UML model in which the flow of the application is modeled. </p> </section> <section name="Goal"> <p> We aim to have a means of generating a stable and flexible front-end by modeling dynamic business processes from UML. The transformation from UML to ASP.NET should be open enough to allow anybody to easily change this process, for example by simply editing some templates. </p> <p> Any feature provided by ASP.NET should also be available in the cartridge. </p> <p> The generated code should be consistent and in-line with the most common best-practices in web development. It must also help the user adding the final pieces of code in order to finish the implementation. Except for the business logic that will need to be implemented manually, the user should not need to have knowledge of the rest of the generated application, although it can never hurt. </p> <p> Regeneration of code from UML should not overwrite manually written code. Classes can attain this goal by using a construction such as inheritance. We use MasterPages and WebControls to isolage those pieces of the ASPX page that need regeneration. </p> <p> When a complete application has been modeled it should be possible to generate and deploy the application without any further changes to the code. The application should work right-away, this allows the user to test-drive and see if it is what he expected, optionally updating the model where necessary. </p> </section> <section name="Features"> <h3>Generation of the complete set of required ASP.NET files</h3> <p> From a UML model the aspdotnet cartridge is used to generate a fully deployable web application, complete with a security implementation, validation rules (client & server), exception handling and page forwarding. These features are all available and easily updatable via the UML model. </p> <p> The generated files include: <ul> <li>ASPX pages</li> <li>code-behind classes</li> <li>controller classes</li> <li>resource file for all text on the site</li> <li>a default page redirecting to the first use-case</li> <li>menu bar</li> <li>web.config</li> <li>page access security based on roles</li> <li>field validation</li> <li><font color="red">[Partially implemented]</font>calendar date-selection popup windows</li> <li><font color="red">[Not yet implemented]</font>online help pages</li> <li><font color="red">[Not yet implemented]</font>error pages for the most common HTTP error codes as well as for uncaught exceptions</li> </ul> </p> <h3>Globalization and Localization</h3> <p> ASP.NET will automatically load the appropriate resource bundle for your localization (l10n) and globalization (i18n) settings whenever available. </p> <p> The aspdotnet cartridge will generate a default resource bundle generated in the language used for modeling. In order to port this file to another language you will need to: <ul> <li> copy it into the same directory, suffix the filename with something as "_fr", "_nl", "_de" (see <a href="http://msdn2.microsoft.com/en-us/library/ms227427.aspx"> ASP.NET Web Page Resources Overview</a> for more details) </li> <li> translate all the message values (leave the message keys untouched)</li> </ul> </p> <h3>Role-based security</h3> <p> For each user there will be a role, depending on the use-cases associated to that user he will gain the privileges to access that use-case's resources and call the corresponding actions. </p> <p> <font color="red">[Not yet implemented]</font> Users can inherit roles from each other, a user that inherits from two other users will be assigned a role which has the accumulated privileges of the roles from both other users. </p> <h3>Client-side validation</h3> <p> Per request sent by the client to the server it is possible to specify the validation rules for the included parameters. The appropriate validator controls will be rendered to handle this validation. This will avoid unneccessary calls to the server. </p> <h3>Server-side validation</h3> <p> <font color="red">[Not yet implemented]</font> In case for some reason an invalid parameter format would arrive at the server the user will be returned to the page of origin with a message indicating what went wrong. </p> <h3>Customizable exception handling</h3> <p> <font color="red">[Not yet implemented]</font> For each action it is possible to forward exceptions to a specific page. By default, however, all exceptions are forwarded to the page where the action call was triggered, a suitable message will be shown. </p> <h3>Consistent page layout</h3> <p> Thanks to the combined use of MasterPages and CSS it is possible to abstract the style & layout from the content of the pages. All pages will be rendered in a similar style, it will be sufficient to update or extend the existing style in order to customize the look and feel of the application. </p> <h3>Tabular resultsets</h3> <p> A very common feature in web pages is the displaying of tabular data. The aspdotnet cartridge directly supports this feature through the use of the the GridView or the DataGrid. You will be able to have control over the following features: <ul> <li><font color="red">[Partially implemented]</font>Paging: by default pages of 15 entries are rendered, this value can be changed</li> <li><font color="red">[Not yet implemented]</font>Exporting: the data can be exported to XML, CSV or Excel</li> <li><font color="red">[Partially implemented]</font>Sorting: you will be able to sort any column you want</li> </ul> </p> <h3>Online help</h3> <p> <font color="red">[Not yet implemented]</font> For each page an online help will be generated that is accessible from a link somewhere on the page (typically at the bottom). The information is gathered from the documentation entered in the UML model. </p> <h3>Breadcrumbs</h3> <p> <font color="red">[Not yet implemented]</font> To make it easier when navigating through a use-case, breadcrumbs will be rendered on screen. For each action/page traversed in the the use-case and breadcrumb will be present, allowing you to go back if needed. Going back will post a copy of the original request. </p> <h3>Dummy data</h3> <p> <font color="red">[Partially implemented]</font> In order to be able to deploy the generated application without the need for manual editing we made it possible to have a dummy implementation generated. It will make sure that the parameters used between the client and the server are populated with dummy data. This way you can check out your application without needing to code one single letter. </p> <h3>Dates and calendars</h3> <p> <font color="red">[Partially implemented]</font> It has always been a burden to properly format dates but the aspdotnet cartridge makes all of this completely transparent for the user. When a date is needed on screen the proper conversion will be taken into account (which of course can be overridden if desired). It is even possible to have a calendar popup rendered next to the ASPX input field, allowing you to easily select a date from the calendar and have if be properly formatted on selection. </p> </section> <section name="ASP.NET"> <p> In order to adhere to a pattern of web development we tried to follow the basic requirements of a Model-View-Controller (MVC) implementation. </p> <h3>Model</h3> <p> The model corresponds to the form object used in the request and subsequently stored in the HttpSession. This form object encapsulates all request parameters for the use-case. No more logic should be put in there. Models are generated by looking at the parameters sent between action states. </p> <h3>View</h3> <p> In an ASP.NET application you will use ASPX pages to represent the view components. In the application's activity graphs views are tagged with the <![CDATA[<<FrontEndView>>]]> stereotype. </p> <h3>Controller</h3> <p> A Controller class defines the business operations performed by the actions on the front-end. Typically it is the user who triggers an event by clicking on a button or a hyperlink. This event is handled by an action that will defer any business operation to the controller. Typically in an ASP.NET application this is handled by the code-behind class for a given page. To better support the regeneration capabilities that are a key component of AndroMDA, we create a seperate controller class for each use case. The code-behind class still exists, though, as is used to insert manual implementations as required (more about this later). </p> </section> </body> </document> 1.1 cartridges/andromda-aspdotnet/src/site/axdoc/howto11.xml Index: howto11.xml =================================================================== <?xml version="1.0" encoding="iso-8859-1"?> <document> <properties> <author email="ecr...@us...">Eric Crutchfield</author> <title>AndroMDA - ASP.NET - Security</title> </properties> <body> <section name="Input Validation"> <p> By default the cartridge generates client-side and server-side validation code. On the client side this is implemented using Javascript, rendered dynamically into the JSP pages by the <![CDATA[<html:javascript ... />]]> struts tag. </p> <p> The server-side code is perfectly equivalent to the validation on the client-side. Client-side validation is interesting because it can warn the user of errors without having to go to the server (which can take time and resources), server-side validation is a safety net that will guarantee input fields are present or properly formatted. </p> <p> Client-side and/or server-side validation can be enabled or disabled using the <code>clientValidation</code> and <code>serverValidation</code> <a href="namespace.html">namespace properties</a> respectively. </p> <p> Different types of validation exist and depending on how you model your application different validation routines will be activated. For example, numeric input fields will be checked, email addresses will be checked for valid format, URLs must be well-formed, input needs to be in a certain range, creditcard numbers must pass the <a href="http://www.beachnet.com/~hstiles/cardtype.html">Luhn</a> check, .. even regular expressions can be matched. </p> <p> Check the table at the bottom of the <a href="profile.html">Profile</a> page to learn what's possible. <em>Please note that more than one validator tagged value can be added to an event parameter.</em> </p> <p> Adding your own validator is simple, you can specify the validator's name so it will be checked if you just make sure your validator has been added to the <code>validator-rules.xml</code> file. To do this make use of the <![CDATA[<!-- validator-rules merge-point -->]]> <a href="../andromda-cartridges/index.html#mergeMappingsUri">merge point</a>. </p> </section> <section name="Next"> <p> Next section: <a href="howto7.html">Calling back-end services</a>. </p> </section> </body> </document> 1.1 cartridges/andromda-aspdotnet/src/site/axdoc/howto10.xml Index: howto10.xml =================================================================== <?xml version="1.0" encoding="iso-8859-1"?> <document> <properties> <author email="ecr...@us...">Eric Crutchfield</author> <title>AndroMDA - ASP.NET - HowTo - Internationalization</title> </properties> <body> <section name="Internationalization"> <p> The aspdotnet cartridge has been designed with Internationalization in mind. All text on a page is pulled from a resource which is built from the documentation included in your model. You can add additional locales and regions by copying this generated resource and translating them to different languages. </p> <p> For <em>ASP.NET v2.0</em> applications, the resource file is output to the <em>App_GlobalResources</em> folder. For <em>ASP.NET v1.1</em> applications, the resource file is output to the <em>Resources</em> folder.</p> <p class="highlight"> <font color="red">[Not yet implemented]</font> A very interesting feature exists that might make it considerably easier for you if you have lots of similar messages in the resource bundle. Set the <a href="namespace.html"><code>normalizeMessages</code></a> namespace property to <code>true</code>. This will make sure elements with the same name will use the same message, when translating such a resource bundle you will never need to do the same work twice. This feature is disabled by default, enabling you to customize each possible message. In most cases it's better to enable it though. </p> <p> In order to port the resource file to another language you will need to: <ul> <li> copy it into the same directory and suffix the filename with something like "_fr", "_nl", "_de" (see <a href="http://msdn2.microsoft.com/en-us/library/ms227427.aspx"> ASP.NET Web Page Resources Overview</a> for more details) </li> <li> translate all the message values (leave the message keys untouched)</li> </ul> </p> <subsection name="Custom Resources"> <p> <font color="red">[Not yet implemented]</font> If you want your own resource messages to be displayed you will need to make use of the merge point inside the generated resource bundle, as explained in this section. </p> <p> In order to do just that you will need to create your own resource bundle with your custom set of messages and put it somewhere in your source tree, for example in <code>/web/src/properties/custom.properties</code>. </p> <p> Next, tell AndroMDA to merge this file into the generated resource bundle, if you generated your project using <code>andromdapp:generate</code> it is sufficient to add the following to <code>/mda/conf/mappings/Bpm4StrutsMergeMappings.xml</code>: </p> <source language="xml"><!-- <mapping> <from><![CDATA[# custom-messages merge-point]]></from> <to> <path>../../../web/src/properties/custom.properties</path> </to> </mapping> --></source> <p> That's it, now you can start using your own resource messages. It is even possible to override the default generated ones by simply repeating them in your custom resource bundle. If you want you can specify multiple <![CDATA[<path>]]> elements, that way all of them will be merged. </p> <p class="highlight"> This feature is particularly interesting when you want to have messages displayed in a more dynamic fashion: you can decide in the controller what message to show, save them (using <code>saveMessages(..)</code>), and have them picked up from the bundle. </p> </subsection> <subsection name="Date Formats"> <p> <font color="red">[Not yet implemented]</font> It is also possible to have input fields representing dates automatically formatted. Two ways to do this exist: on a global level you can use the <code>defaultDateFormat</code> namespace property which defaults to <code>dd/MM/yyyy</code> (go <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html">here</a> to learn more about possible date formats) , it sets the format for all dates in the modeled application; on a field level it is possible to use the <code>@andromda.struts.view.field.format</code> tagged value, just make sure the parameter is a date type and it will override the global setting. </p> <p> Use the <code>strict</code> keyword in front of the date format, that way the application will strictly check the format, without being lenient. </p> <p class="highlight"> Use dates in combination with the <code>@andromda.presentation.web.view.field.calendar=true</code> tagged value to have a popup calendar trigger rendered next to the input field, the selected date will immediately be converted into the correct format. A screenshot is shown here: <a href="howto2.html">Activity Graphs</a> <em>(bottom of the page)</em> </p> </subsection> </section> <section name="Nice to know"> <subsection name="Action Forms"> <p> <font color="red">[Not yet implemented]</font> Using dates for action parameters will yield a specific date formatter to be generated in the corresponding action form, this in addition to other convenience methods. </p> </subsection> </section> <section name="End of How-To Guide"> <p> That's it for the how-to guide. Please check our our <a href="tips.html">Tips & and Tricks</a> page for further information about the in's and out's of the aspdotnet cartridge. </p> </section> </body> </document> 1.1 cartridges/andromda-aspdotnet/src/site/axdoc/howto.xml Index: howto.xml =================================================================== <?xml version="1.0" encoding="iso-8859-1"?> <document> <properties> <author email="ecr...@us...">Eric Crutchfield</author> <title>AndroMDA - ASP.NET - How To</title> </properties> <body> <section name="Modeling example"> <p> This guide borrows heavily from Wouter Zoons' How-To guide for the <a href="http://galaxy.andromda.org/docs/andromda-bpm4struts-cartridge/howto.html">Bpm4Struts cartridge</a>. In fact, we're going to leverage the same models as the Bpm4Struts How-To so that you can see that while the platforms are completely different, the models will be exactly the same. For another great example of this "model once"/"generate different systems" ability, check out the Getting Started Guides for <a href="http://galaxy.andromda.org/index.php?option=com_content&task=category&sectionid=11&id=42&Itemid=89">Java</a> and <a href="http://galaxy.andromda.org/index.php?option=com_content&task=category&sectionid=12&id=43&Itemid=90">.NET</a>. </p> <p> The following How-To attempts to get you productive with this cartridge as quickly as possible. To accomplish this, the following sections describe a very small example that will allow us to explain more features with less application complexity. </p> <p> Please note that ALMOST everything happens in UML! While this version supports generating a lot of functionality out-of-the-box, a lot of UI features will still need to be setup manually. </p> <p> In this how-to we will cover the following topics: <ul> <li><a href="howto1.html">UseCases</a></li> <li> <a href="howto2.html">Activity Graphs</a> <ul> <li><a href="howto2.html#Initial_States">Initial states</a></li> <li><a href="howto2.html#Action_States">Action states</a></li> <li><a href="howto2.html#Transitions">Transitions</a></li> <li><a href="howto2.html#Event_Parameters">Event Parameters</a></li> <li><a href="howto2.html#Page_Variables">Page Variables</a></li> <li><a href="howto2.html#Decision_Points">Decision Points</a></li> <li><a href="howto2.html#Final_States">Final States</a></li> </ul> </li> <li><a href="howto3.html">Controllers</a></li> <li><a href="howto4.html">Custom Code</a></li> <li><a href="howto5.html">Session Objects</a></li> <li><a href="howto6.html">Security</a></li> <li><a href="howto7.html">Calling Back-End Services</a></li> <li><a href="howto8.html">Tables</a></li> <li><a href="howto9.html">Other Content</a></li> <li><a href="howto10.html">Internationalization</a></li> </ul> </p> <p> You can download the UML model containing all models for all sections <a href="howto/HowToModel.xml.zip">here</a>. </p> <p> In order to start the tutorial click <a href="howto1.html">here</a>. </p> </section> </body> </document> 1.1 cartridges/andromda-aspdotnet/src/site/axdoc/installation.xml Index: installation.xml =================================================================== <?xml version="1.0" encoding="iso-8859-1"?> <document> <properties> <author email="ecr...@us...">Eric Crutchfield</author> <title>AndroMDA - ASP.NET - Installation & Configuration</title> </properties> <body> <section name="Installation"> <p> If you are <strong>new</strong> to AndroMDA and have Visual Studio 2005 then you should follow the <a href="http://galaxy.andromda.org/index.php?option=com_content&task=category&sectionid=12&id=43&Itemid=90">Getting Started .NET</a> guide. The guide will walk you through setting up your environment and modeling a complete application from data to web. </p> <p> If you don't have Visual Studio 2005, you can follow these steps to generate a web project using Maven. </p> <a name="Install"/> <subsection name="Pre-install Tasks"> <p> Again, if you are new to AndroMDA and have Visual Studio 2005, you <em>should</em> use the <a href="http://galaxy.andromda.org/index.php?option=com_content&task=category&sectionid=12&id=43&Itemid=90">Getting Started .NET</a> guide, instead of this How-To. Once you've gone through that guide, you can return here to get a more in-depth look at the aspdotnet cartridge. </p> <p> If you are new to AndroMDA and <em>don't</em> have VS 2005, you should follow steps 1-4 of the <a href="http://galaxy.andromda.org/index.php?option=com_content&task=view&id=118&Itemid=90">Environment Setup</a> guide, and then return here to install the AndroMDA .NET Application plugin. </p> <p> If you are an old hat with AndroMDA, then you can jump right in and start using the cartridge by following these steps. </p> </subsection> <subsection name="Install AndroMDA .NET Application plugin"> <p> To generate a .NET application without the Visual Studio 2005 plugin, you will need the <code>andromdanetapp</code> plugin. You will need to download and install the AndroMDA .NET Application plugin into your Maven repository, but this is the only AndroMDA artifact that you will explicitly install. All other artifacts, such as AndroMDA cartridges, will be automatically downloaded by the Maven scripts generated by the plugin. Install the plugin by following the steps below. <ol> <li> Download the <a href="http://team.andromda.org/maven2/org/andromda/maven/plugins/andromdapp-maven-plugin/3.2-SNAPSHOT/andromdapp-maven-plugin-install-3.2-SNAPSHOT.zip">AndroMDA plugin installer</a>. </li> <li> Unzip the contents of the installer into your Maven repository at C:\Documents and Settings\<strong>your user name</strong>\.m2\repository. </li> <li> Verify that the following directory was created: C:\Documents and Settings\<strong>your user name</strong>\.m2\repository\org\apache\maven\plugins\andromdanetapp-maven-plugin\1.0-SNAPSHOT </li> </ol> </p> </subsection> <a name="Getting_the_Cartridge"/> <subsection name="Getting the Cartridge"> <p> Once you have met the requirements above, checkout the latest ASP.NET cartridge from CVS HEAD. You have two options: <ul> <li> <p> Follow the anonymous CVS access at <a href="http://sourceforge.net/cvs/?group_id=154568">andromdaplugins project</a> on SourceForge to checkout the latest <b>andromda-plugins</b> module from <code>HEAD</code>. </p> </li> <li> <p> If you are using an IDE like Eclipse, open your CVS repository exploring perspective, create a new repository with connection type (pserver), username (anonymous), password(<i>blank</i>) host (andromdaplugins.cvs.sourceforge.net) and repository path (/cvsroot/andromdaplugins). Once connected, expand HEAD and check out <code>andromda-plugins</code>. </p> </li> </ul> Note that this will check out all cartridges and plugins which are not relevant to the ASP.NET cartridge, but will ease your build process. </p> </subsection> <a name="Building_the_Cartridge"/> <subsection name="Building the Cartridge"> <p> Once you have checked out the <code>andromda-plugins</code> project, you should build the entire <b>andromda-plugins</b> repository by running <i>mvn install</i> in the <code>andromda-plugins</code> folder. This builds the andromda-aspdotnet cartridge as well as the andromdanetapp maven plugin and the csharp project generator. Note: this can take 5 minutes or more, depending on what needs to be downloaded from the remote repository, and the speed of your computer. </p> </subsection> </section> <section name="Next"> <p> Before starting with the ASP.NET howtos, find out how to generate your <a href="project.html">ASP.NET project</a>. </p> </section> </body> </document> 1.1 cartridges/andromda-aspdotnet/src/site/axdoc/howto1.xml Index: howto1.xml =================================================================== <?xml version="1.0" encoding="iso-8859-1"?> <document> <properties> <author email="ecr...@us...">Eric Crutchfield</author> <title>AndroMDA - ASP.NET - HowTo - Use-Cases</title> </properties> <body> <section name="Use-Cases"> <p> Before you start modeling your application front-end you will want to think about how to split the application in different <em>use-cases</em>. Each use-case should define a unique set of processing logic operations that are specific to your application. Typical use-cases are: 'Login', 'Place order', 'Add new user'. No two use-cases should have the same name. </p> <p> For the sake of simplicity our application will consist of only a single use-case, though your application can have as many use-cases as is appropriate. </p> <p> Let's call our use-case <code>Purchase Items</code> (spaces are allowed in the name). We will put it in a suitable package, and label it with the <![CDATA[<<FrontEndUseCase>>]]> stereotype. </p> <p class="highlight"> You must have exactly one <i>Front End Application</i> use-case, which will be considered the application's entry point. This use-case must be labeled with the <![CDATA[<<FrontEndApplication>>]]> stereotype. </p> <p> <img src="images/org/andromda/test/use-cases.gif"/> </p> </section> <section name="Nice to know"> <p> Use-cases split up the application in distinct parts, the generated code will reflect this by emitting files related to a specific use-case in a single package. </p> </section> <section name="Next"> <p> The next step is to specify in detail how our application's presentation layer is going to behave. This is done by means of an <a href="howto2.html">activity graph</a> </p> </section> </body> </document> 1.1 cartridges/andromda-aspdotnet/src/site/axdoc/howto3.xml Index: howto3.xml =================================================================== <?xml version="1.0" encoding="iso-8859-1"?> <document> <properties> <author email="ecr...@us...">Eric Crutchfield</author> <title>AndroMDA - ASP.NET - Controllers</title> </properties> <body> <section name="Controllers"> <p> Modeling activity graphs allows you to clearly express the way your application flows from one state into another. This already helps a great deal in the code generation process, but all this effort only makes sense when you are actually able to insert your own code fragments into this process. UML elegantly allows this. </p> <p> Per use-case you will need to model a class in which you will put all the operations that can be called from within that use-case's activity. </p> <p> You will need to associate this class to the use-case, since the cartridge can't just guess which use-case it corresponds to. Therefore we have two options depending on the maturity of the UML tool you are using: </p> <p> <ul> <li>Assign this class as the context of the activity graph (MagicDraw supports this), this is a standard UML feature that, unfortunately, is often overlooked by CASE tools vendors. </li> <li>Add a tagged value to the controller, pointing to the use-case, like this: <code>@andromda.presentation.controller.usecase=My UseCase</code> (the value is the name of the use-case). </li> </ul> </p> <p> While either one of these options will do, we recommend using the former because that way you won't need to update the tagged value whenever you decide to change the name of the use-case (which can be a pain). </p> <p> <img src="images/org/andromda/test/controllers.gif"/> </p> <subsection name="Operation parameters"> <p> So what exactly happens with the parameters you model inside the controller operations? By specifying the name and type of a parameter you can gain access to an event parameter or page-variable defined in another part of the application. Just make sure the name and type perfectly match. </p> <p> In the next example you see how a controller operation is called before entering the <![CDATA[<<FrontEndView>>]]> action state. This operation has a single argument <code>data : List</code> which exactly matches the page variable on the outgoing transition. Doing this will allow you to control this page's variables in the implementation of the controller operation. </p> <p class="highlight"> Please note that it is possible your CASE tool is not showing the operation parameters in the diagram, as in the image below. </p> <p> <img src="images/org/andromda/test/deferring-param.gif"/> </p> <p> <img src="images/org/andromda/test/deferring-param-ctrl.gif"/> </p> <p> Not only can page-variables be controlled like this, it also works for any existing event parameters (e.g. buttons or hyperlinks on items in a table), as long as you include them as an argument on the operation of the controller. </p> <p> What might look strange at first is the fact that you don't need a return value on the controller operation. This is because you are not modeling code, you are modeling the behavior of the state machine. The cartridge is responsible for determining the code to generate. You just need to remember to include a parameter for each form field you wish to use. (Note: return values are only needed when using controller operations in a decision process as we have seen <a href="howto2.html#Decision_Points">here</a>). </p> <p> It is not needed to add tagged values on controller operation parameters. Any tagged values will be fetched from the actual page-variables or event parameters. </p> </subsection> </section> <section name="Next"> <p> Now that we know how to define custom code operations we need to learn how to <a href="howto4.html">call them</a> from within your activity graph. </p> </section> </body> </document> 1.1 cartridges/andromda-aspdotnet/src/site/axdoc/Building.xml Index: Building.xml =================================================================== <?xml version="1.0" encoding="iso-8859-1"?> <document> <properties> <author email="ecr...@us...">Eric Crutchfield</author> <title>AndroMDA - ASP.NET - Building the Cartridge</title> </properties> <body> <section name="Building the Cartridge"> <p> Once you have checked out the <code>andromda-plugins</code> project, you can simply build the <b>andromda-aspdotnet</b> catridge in <code>andromda-plugins/cartridges/andromda-aspdotnet</code> by running <i>mvn</i> in the latter location. </p> <a name="Building_Reports"/> <subsection name="Building Reports"> <p> To build the ASP.NET cartridge site documentation requires a few extra Maven 2 plugins to be downloaded from the Maven 2 sandbox in SVN. The <a href="http://maven.apache.org/guides/development/guide-building-m2.html">Maven build</a> documentation will give you some information on how to access their SVN. </p> <p> You will need to check out the following plugins from Maven <b>sandbox</b>. <ul> <li><p>maven-changes-plugin</p></li> <li><p>maven-changelog-plugin</p></li> </ul> Once you have built them (mvn install), these plugins will reside in your local repo. </p> <p> In adopting the existing AndroMDA site format for the documentation, the Maven Doxia plugin needs a patch to be applied. You can check out <b>doxia-1.0-alpha-8</b> from Maven SVN and apply the patch <a href="http://jira.codehaus.org/browse/MNG-545">here</a>. It is not critical to apply this patch, but if it's not applied, the generated XHTML will not be formated correctly but still acceptable. </p> <p> All other required plugins will be downloaded to your local repo if they don't already exist. </p> <p> You can download the source examples used in the howto for all sections <a href="HowToModel-src.zip">here</a> and extract to the target/site folder of the andromda-aspdotnet plugin. </p> </subsection> </section> </body> </document> 1.1 cartridges/andromda-aspdotnet/src/site/axdoc/user-guide.xml Index: user-guide.xml =================================================================== <?xml version="1.0" encoding="iso-8859-1"?> <document> <properties> <author email="wo...@an...">Wouter Zoons</author> <title>AndroMDA - Bpm4Struts - User Guide</title> <gennews>no</gennews> </properties> <body> <section name="Abstract"> <p class="abstract"> This page is a user guide to the bpm4struts cartridge, here you will find information on specific modeling features. If you are looking for a place describing what you need to do with your UML tool in order to model an application for bpm4struts you should read on. </p> </section> <section name="Model elements"> <p> With model elements we mean the collection of all those elements that allow us to express ourselves and formally describe process flow. We will use these elements to model our Struts application. What follows is a list of elements and a description on how they map onto Struts specific objects. </p> <h3>Classes</h3> <p> In bpm4struts classes are only used to model controllers, a controller is the component that contains the logic to perform business operations. Most of the time, in J2EE applications, you will want to delegate your call from the controller to a service running in the back-end. </p> <p> A class is assigned to be the context of an activity graph and it contains operations that are referenced by CallEvents. A CallEvent is an event that you can model in the activity graph but that allows you to create a link with the controller class. You will see what this means in more detail when taking a look at the sample application. </p> <h3>Actors</h3> <p> An actor represents a user in the system, typically you will model an actor for each different type of user that exists in your application, this might be a 'Manager', 'Administrator', 'Guest', etc... </p> <p> Actors may generalize eachother, making it possible to combine several roles into a single one. </p> <p> Modeling actors will activate security in the generated application, an actor is only authorized to request those pages and actions belonging to the use-case he has been associated with. </p> <h3>Use-Cases</h3> <p> Each unit of processing logic is combined into a single use-case. Typical use-cases are: 'Login', 'Place order', 'Add new user'. No two use-cases should have the same name. </p> <p> Put your use-case in a dedicated namespace (such as a package in Java) so there is no confusion on what is supposed to be happening inside. </p> <h3>Activity Graphs</h3> <p> Each use-case is described in more detail using an activity graph. Such a graph allows you to model the process flow from one state into another. By doing so you will determine when the user is presented a page and when he will be calling actions. </p> <p> In an activity graph you will model: one initial state, action states, one or more final states, transitions. </p> <h3>Transitions</h3> <p> Transitions are the 'arrows' that denote a flow from the source state to the target state. Every state in an activity graph has at least one outgoing transition, except for the final state, no outgoing transitions are allowed on a final state. </p> <p> Optionally a transition may carry a trigger, a trigger indicates that something happened at the source that triggered the application into following the path represented by the transition. In bpm4struts you will use a trigger when you want to model an action such as a button-click on a page, because this will trigger a specific call to an action on the server. </p> <p> In addition, triggers are also interesting because they can have parameters, so each time the client and server exchange information you will want to use the trigger to specify the parameter to transport in the request. </p> <p> It is also possible for a transition to carry a guard, but this is only valid when the transition is coming out of a decision point (see below). The decision point represent a specific question ... [truncated message content] |