←Older revision |
Revision as of 22:55, 10 September 2014 |
Line 1: |
Line 1: |
| When showing the usefulness of [[DukeScript]] some people believe it is best demonstrated on games like [[MineSweeper]]. Other group recommends to show [[wikipedia:Create,_read,_update_and_delete|CRUD]] - as a typical business oriented application. | | When showing the usefulness of [[DukeScript]] some people believe it is best demonstrated on games like [[MineSweeper]]. Other group recommends to show [[wikipedia:Create,_read,_update_and_delete|CRUD]] - as a typical business oriented application. |
| | | |
- | It is my pleasure to announce a sample [[DukeScript]] [[CRUD]] being (almost) ready (almost, because it depends on a snapshot version of [[Jersey]], but that should not stop you trying it). | + | It is my pleasure to announce a sample [[DukeScript]] [[CRUD]] and [[Jersey]] wizard being ready. Watch, follow and enjoy: |
| | | |
- | == [[CRUD]] for [[Java]], [[iOS]], [[Android]] and any [[Bck2Brwsr|browser]] ==
| + | {{#ev:youtube|WYhshaXMAKM}} |
| | | |
- | First of all the basic setup:
| + | [[Category:Video]] |
- | | + | |
- | <source lang="bash">
| + | |
- | $ git clone https://github.com/jtulach/jersey.git
| + | |
- | $ cd jersey/
| + | |
- | $ git checkout d6e0bf4c98a0b229aa3c2b14cea73031b78ee59f
| + | |
- | $ cd examples/jerseyfaces/
| + | |
- | $ mvn clean install
| + | |
- | </source>
| + | |
- | | + | |
- | === [[REST]] Server ===
| + | |
- | | + | |
- | Now you should open '''server''' project in [[NetBeans]] IDE and start it or debug it. Alternatively you can stick with command line [[Maven]] and try:
| + | |
- | | + | |
- | <source lang="bash">
| + | |
- | # assuming you are in examples/jerseyfaces/ directory
| + | |
- | $ cd server
| + | |
- | $ mvn exec:java
| + | |
- | INFO: Started listener bound to [localhost:8080]
| + | |
- | Press Enter to shutdown the server
| + | |
- | </source>
| + | |
- | | + | |
- | the server gets started on given port, which you may inspect in your browser. The resource name is ''contacts'', e.g. the URL is http://localhost:8080/contacts - keep server process running.
| + | |
- | | + | |
- | === Clients ===
| + | |
- | | + | |
- | However that is not the important part. More interesting is to see the variety of clients that we have. Open the '''client''' project in [[NetBeans]] IDE and either run or debug it - you get desktop client (plus a tooling support in [[NetBeans]]). Alternatively stick with [[Maven]] to see the client as well (without any tooling):
| + | |
- | | + | |
- | <source lang="bash">
| + | |
- | # assuming you are in examples/jerseyfaces/ directory
| + | |
- | $ cd client
| + | |
- | $ mvn exec:java
| + | |
- | </source>
| + | |
- | | + | |
- | If you reproduced my steps properly, you will see record with information about [[I|me]] which you can modify, delete or create your own ones.
| + | |
- | | + | |
- | Let's try another client. From the client project's popup menu choose '''Custom/Run in a Browser''' and you'll get client which looks the same, but runs in real browser, even without [[Java]] plugin installed - completely client side technology thanks to [[Bck2Brwsr|our VM]]. Again, this can be done from command line:
| + | |
- | | + | |
- | <source lang="bash">
| + | |
- | # assuming you are in examples/jerseyfaces/client directory
| + | |
- | $ mvn -Pbck2brwsr clean package bck2brwsr:show -Dbck2brwsr.obfuscationlevel=NONE
| + | |
- | </source>
| + | |
- | | + | |
- | === Next Steps ===
| + | |
- | | + | |
- | Of course, there are other clients (hint [[iOS]], [[Android]]) in the '''Custom''' menu, but I think, the point has been made. Try it and let me know if something is broken. I'd like to turn this into a [[Maven]] archetype, so a bit of testing is going to be useful. Thanks for your help.
| + | |
- | | + | |
- | <comments/>
| + | |