How can I implement/use browser using lwuit in j2me? - java-me

I am new to LWUIT, its indeed a great fun to use it so far. Currently I have to use its browser component to send and receive data to and from the server. Can anybody give me an insight about it or a tutorial so that I can get working into it. Thanks in advance.

If you intend to have browser specific functionality like XML, HTML page rendering in your application than read the following articles
HTML Component Writeup In Ofir's Blog
Mobile web and HTML inside JavaME with LWUIT {Suggested by #Baqueta, Thanks}
Download LWUIT 1.5 and check project 'Browser' under folder 'apps' in lwuit root directory.
.
If you intend to implement communication between client and server using LWUIT than refer LWUIT4IO library packaged with LWUIT 1.5 download. Read the following articles to better understand 'LWUIT4IO' the library.
Introducing LWUIT For IO (LWUIT4IO)
Parsing In LWUIT & LWUIT4IO
Logging & Caching In LWUIT4IO
.
If you intend to communicate with the server from mobile client purely for data exchange then have a look at Generic Connection Framework. Here you can find ample information, sample code snippets and get to know various connection methodologies available for JavaME.

Related

How to connect WIX template with 3rd party REST APIs?

I created a simple web site using WIX platform. (https://www.wix.com/). I have some simple forms. Like customer registration and package management. All the UI part is done. And I have a Node.JS server to manage customers and packages. API is 100% done.
Now I need to connect WIX template with my NOde.JS REST API. Is there any possible ways to do this ?
My Node Server is deployed on a Ubuntu server and I can access it anywhere.
Please help me on this.
Yes, now Wix has this thing called Wix Code platform, which enables you to dynamically control your UI components and bind it to data coming from the outside.
To answer your question, they have this fetch API which you can use to write code to fetch your own server and get the data from it. Here is a link Wix Code API - fetch
Anyway, this is their site, Wix Code, you may learn a lot more there. Also they have those tutorials and examples of many "how to..." and examples Wix Code Tutorials and Videos
Cheers!

Web based Oracle Scene Builder analog

I want to provide an ability to create simple java and javafx applications to the users on my website. I've found excellent code editor (Ace) but I don't know how to provide FXML design tool to the Web users.
Is there any options?
ADD I want the users to use this interface builder without any additional requirements like Java 8 or something
How to host SceneBuilder in a web page (requires Java 8):
Build SceneBuilder from it's source.
Package it as a Browser Embedded Application.
Host your packaged application on the Internet and direct web users to its URL.
Other than using a fork of SceneBuilder for your project, I don't know of any other feasible way to provide visual FXML editing capabilities. I would certainly not recommend trying to create from scratch your own FXML visual editor written in either Java or JavaScript.

Building website for domino server

I need to make a small website to be hosted at a domino server but as far as I understand, I couldn't use a simple .html file or .php, instead it works with some weird stuff like .nsf, right? Also, it isn't clear to me wich language is used to deploy webpages with domino server, and if there is a good book about it.
Starting with Lotus Domino 8.5.x you can create web applications using XPages. XPages "is based on web development languages and standards including JavaScript, Ajax, Java, the Dojo Toolkit, Server-side JavaScript and JavaServer Faces" (source: http://en.wikipedia.org/wiki/XPages).
If you are interested in learning more about XPages, the following book is very useful:
Mastering XPages: A Step-by-Step Guide to XPages Application Development and the XSP Language
There is also the "classic" way of creating web applications with Lotus Domino if using XPages is not an option. The following book provides a good overview of that method:
IBM Lotus Domino: Classic Web Application Development Techniques
You can use simple static html files but the beauty of Domino is that you can develop dynamically created web sites using the back end database processes.
If you want to do something with just html then drop your html files into the /domino/html folder and they will be served out.
If you want to do something more powerful start at http://www.xpages.info which is run by the Open Source community for Domino.
There are quite a few out of the box projects available such as Wikis, "Team Rooms", discussion forums, blogs and document libraries. Some of these are also packaged with the domino install. Some of these are content management systems with some of the same functionality as wordpress or Joomla and might work well for you.
Some examples : http://xpages.info/XPagesHome.nsf/Demos.xsp
As with any platform there are quirks and gotchas but it is a brilliant platform. Contact me if you need a better steer.
You could use the domino/html approach or you could utilize the new web development interface and environment in Domino, since 8.5, called XPages. It's a technology derived from JSP (Java Server Pages) using standard web methods and technologies such as Java, JavaScript, AJAX, DOJO, CSS working with predefined Custom Controls giving you the drag and drop approach to development.
Several book are on the market, one of them close to release:
XPages Portable Command Guide: A Compact Resource to XPages Application Development and the XSP Language
Mastering XPages: A Step-by-Step Guide to XPages Application Development and the XSP Language
XPages Extension Library: A Step-by-Step Guide to the Next Generation of XPages Components
For instructional videos, there's XPages.tv (Videos)
While a Domino server typically is used to host Notes application (.nsf files), you can use it to host raw HTML files. The default root for this is the domino\html directory.
The documentation on web server configuration has more details on this.
Configuring HTML, CGI, icon, and Java files for Web Site documents
The following tech note details how to run PHP on a Domino server, although Domino itself does not have PHP.
http://www-01.ibm.com/support/docview.wss?uid=swg21099845
There is also this article on how to create PHP for Domino.
http://www.ibm.com/developerworks/lotus/library/domino-php/
Host a static html file in a different place to domino directory
If you want to persist your static html files in a different place to domino\html then you can do this in the following way:
Configure a new WebSite for your domino server:
https://www.ibm.com/support/knowledgecenter/SSKTMJ_10.0.1/admin/conf_configuringhtmlcgiiconandjavafilesforwebsite_t.html
Copy your files to the specified folder on your server's disk.
Example:
Website:
File on domino server:
Open in browser:
With this approach I have deployed a complete angular single page application on a domino server.

can i use a gwt library in a jsf project

I want to create a mobile app using PrimeFaces. In it, I also want to use Phonegap, but not directly, rather through its GWT abstraction- phonegap-gwt.
Some of the features provided by PhoneGap, in a phonegap application, require the web page accessing the phone's functionality to be a local page(on the device where phone's functionality is to be accessed)... this can be done using phonegap-gwt in a google web toolkit project also, i.e. dont put server side code in the page that utilises phonegap-gwt code(correct me if I am wrong here, so far?)... On the other hand, the program created by jsf(i.e. primefaces) is a mobile web application.
Hence, what I am confused about is, can I keep GWT code (for Phonegap access through GWT) and JSF code in the same project? I understand that the phonegap gwt code will get compiled into Javascript, but can such programming,i.e. keeping gwt code with jsf code, be implemented? Even if this is possible theoretically, wont there be issues/restrictions that I would have to keep track of? What are those restrictions? Have you tried combining GWT code with JSF code? Did it work?

Pre-generating a JSF based web app for better performance and offline mode

I have a JSF web application, where the dynamic content is based on data taken from a database.
Since all the data is available in advance, I would like to see if there is a way to pre-generate all the pages into their final HTML format on the server, so that the user experiences much better performance and doesn't have to wait for the page generation.
Moreover - my app is running on mobile devices and I want to have the option of using it offline, by downloading everything to the device in advance (assume I don't need any business logic to work at real time).
So, I'm not talking here about the built-in caching of JSF - I'm looking for a kind of method that converts a JSF app into some static website that works much faster and can run offline as well.
Thanks.
You can use HTML5 for offline cache.
See a few articles about it here:
Tutorial
Tutorial
There are more examples on the internet for HTML5 and working offline

Resources