HTML presentation layer + CN1

32 views
Skip to first unread message

ivan....@gmail.com

unread,
Jun 19, 2014, 10:47:17 AM6/19/14
to codenameone...@googlegroups.com
We have been working with CN1 (and even LWUIT) on last years, and now we are experimenting HTML5 based solutions with WebView (on CN1) for more agile presentation layer change cycle.

Our interface designers accumulate a strong know-how on HTML for multiple devices (basically all sorts of Androids and Ithings), so they expect that the their layout could render exactly as produced on all sorts of mobiles.

The clash with Swing's approach of CN1 is clear: we could not rebuild the presentation layer exactly as produce, due the differences on Swing components and HTML rendering.

So, we are raising this discussion to check a proposed solution before invest in it. Here it goes:

  • All the crude data and model actions are kept on server side, accessible through Web Service (JSON based)
  • We will use CN1 WebBrowser to render HTML for presentation
  • HTMLs are located on server side (client side HTML and assets hierarchically organised seems impossible on CN1)
  • All navigation actions on HTML (basically forms and links) are intercepted on CN1, and CN1 code is used to manage all sort of actions that need to be performed (it means that CN1 code has to control user navigation, besides that, needs to have access to filled forms on HTML and interoperate with Web Services).
  • I was thinking about let on server only HTML templates, and embed a template engine on CN1 (using data from Web Service to generate final HTML). Another possibility is to let the server do this job, and CN1 only set the parameters on the HTTP request to pull an already complete HTML.
By this way, we are trying to escape from Native vs "HTML5 base solutions" dichotomy, and organize our product development flow respecting separation of concerns (designers vs developers), and keep CN1 cross-platform development.

Anybody seems it possible, impossible, tried something similar? Please, any advice is welcome. 

Shai Almog

unread,
Jun 20, 2014, 12:34:41 AM6/20/14
to codenameone...@googlegroups.com
This thread split for some reason, I'll continue there for clarity: https://groups.google.com/d/msg/codenameone-discussions/A7fw33Xg-6c/9PQ6zmIHt5sJ
Reply all
Reply to author
Forward
0 new messages