SDA SE Wiki

Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering

User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
teaching:labs:xp:2007b:firstdaychallenge [2007/08/29 09:02]
m.schmatz
teaching:labs:xp:2007b:firstdaychallenge [2018/05/09 01:59] (current)
Line 1: Line 1:
 +====== FirstDayChallenge ======
  
 +//Please read everything on this page to know what to do!//
 +
 +The goal of the First Day Challenge is to develop together a very small application which, nevertheless,​ contains already lots of the technology, we need in our lab. In particular, we aim to cover
 +  * Test first development (Unit Tests with jUnit)
 +  * Customer oriented development (Acceptance Tests)
 +  * Contious Integration (SVN, CruiseControl,​ Traffic light, ANT-Buildscripts)
 +  * Webservices (Server/​Client,​ Application Server)
 +
 +
 +===== The Story =====
 +
 +We like to develop the infrastructure for the virtual //Bonn Press Agency (BPA)//. The agency provides a Webservice running on a dedicated server to collect news from it's roving reporters. This news is then offered directly to the agency'​s subscribers via another method of the webservice. ​
 +
 +{{ :​teaching:​labs:​xp:​2007b:​firstchallenge.png?​200}}
 +
 +
 +===== Previously on FirstDayChallenge =====
 +
 +For the [[.:​projects:​newsserver]],​ [[.:​projects:​newsprovider]] and [[.:​projects:​newsreader]] there are already dummy projects in the SVN repository. They include ANT-buildfiles which are already suited for our needs and they shouldn'​t be modified. As wel, a partof the [[.:​projects:​acceptancetests]] project is prepared for the project.
 +
 +===== Command & Conquer =====
 +
 +Discuss the task and separate it into several concern, so that each pair can provide its part to the whole game.
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +===== Prepare your Working Environment =====
 +
 +  * Start Eclipse **3.3**((Not Eclipse 3.2.1!)) (Europa) with workspace ''​L:​\work\workspace''​
 +  * Set SWT_JAR to ''​C:​\Program Files\eclipse\plugins\org.eclipse.swt.win32.win32.x86_3.3.0.v3346.jar''​ (As described [[.:​projects:​swt|here]])
 +  * Go to Window -> Preferences -> Ant -> Runtime and set a property named jaxws.lib to "​L:​\Work\glassfish\lib"​.
 +  * Add ''​C:​\Program Files\eclipse\plugins\org.junit4_4.3.1\junit.jar''​ to [[wp>​Apache Ant|ANT]] buildpath ([[code_templates|cmp. screenshot here]])
 +  * Add [[https://​svn.iai.uni-bonn.de/​repos/​iai_software/​xp/​xp2007b/​trunk/​|this SVN Repository]] to Eclipse
 +  * Check out these projects:
 +    * NewsProvider
 +    * NewsReader
 +    * NewsServer
 +    * AcceptanceTests
 +  * Run all default targets of all build.xml
 +    * But: in ''​NewsReader''​ and ''​NewsProvider''​ run the **all** target instead of **simple**
 +  * Press F5 to update your project.
 +  * Publish NewsServer on Glassfish ​
 +    * select the //Java EE// perspective
 +    * switch to the //Servers// view 
 +    * right-click on the Glassfish server
 +    * select //Add projects// and add the //​NewsServer//​ project
 +    * right-click on the Glassfish server ​
 +    * select //Start//
 +    * visit http://​localhost:​8080/​NewsServer/​NewsServerService?​Tester
 +    * click on //​currentTime//​
 +    * visit http://​localhost:​4848/​ and acquaint yourself with the admin console (User: //admin// Password: //​adminadmin//​)
 +  * Run gen_local_stub of build.xml of the two clients ​
 +  * Press F5 to update your project.
 +  * In the AcceptanceTest project, right-click on the ''​TestFramework''​ folder and choose //FitNesse -> Launch FitNesse runtime on this root folder//
 +  * Select the //TestSuite for the FirstDayChallenge//​ and click on //Suite// in the menu bar to test your Acceptance Test framework
 +
 +===== Happy Coding =====
 +
 +  * Don't forget to update often!
 +  * First test, than code.
 +  * Commit only running and tested code.
 +  * Commit often, commit early
 +
 +===== Technical Details =====
 +
 +==== Where do the Webservices run? ====
 +
 +Webservices are accessible via a HTTP-request,​ though, there must be some kind of ”Websever“ available to provide the access. This Webserver is called //​Application server// ​ and we use a program called //​Glassfish//​ for it.
 +
 +Every developer machine has for testing services on instance of //​Glassfish//​ installed. This instance can be started and stopped from within //Eclipse// and //Eclipse// can automatically deploy (=install) new Webservices to it. The Webservce then is accessible via the url ''​http://​localhost:​8080/​ProjectNave/​ClassnameService''​ At http://​localhost:​4848,​ an administration console is available((Username:​ ''​admin'',​ Password: ''​adminadmin''​)) which allws to administer the server. If you run the ''​gen_local_stubs''​ Ant-task of a client ''​build.xml'',​ code is generated which tells the client to use this local Webservice.((This ''​Endpoint''​ code is generated, so never check this in, since it is rebuild every time ant is started))
 +
 +In addition, an application server is running at ''​se-services.iai.uni-bonn.de''​. This server is public, and therefore **only Pascal and Mark can deploy services to it** (or update them). On the other hand, the code in the SVN repository is always checked against the public version of the service. So, if you want to commit new client code, proceed as following:
 +  * Run all test for the client and the server application.
 +  * Commit the server application.((Meaning:​ Update, Merge, Test, Update, ... Commit))
 +  * Ask Pascal or Mark to deploy the new verson to ''​se-services.iai.uni-bonn.de''​.
 +  * Wait until they'​ve done it.
 +  * Run the ''​gen_stubs''​ ant task of your client application to switch to "​global service usage"​.
 +  * Press F5 to update your project.
 +  * Test the client application.
 +  * Commit the client application.((You know the game: Update, Merge, Test, ... Commit))
teaching/labs/xp/2007b/firstdaychallenge.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019