webOS Nation Forums >  webOS Developers >  webOS Development > Enyo 2 for Legacy webOS Development
Enyo 2 for Legacy webOS Development
  Reply
Like Tree7Likes

 
Thread Tools Display Modes
Old 09/14/2013, 02:29 PM   #1 (permalink)
Member
 
Posts: 127
Hello webOS folks,
I'm hoping to get some guidance from devs that have been working with Enyo 2.2 (and 2.3 MVC) for legacy webOS devices. I've been lurking around the enyo forums and poking around the edges for some time.

These days I'm far away from a previous life as an actionscript coder (Macromedia Flash's version of ECMAscript) and have been reacquainting myself with Javascript in preparation for a project that would be an internal tool for my current business, but which I might open-source for the motion picture archive community if A: I can make it reasonably cross-platform and B: If its good enough that it isn't horribly embarrassing.

I need this tool to work on webOS 2.2.4 and 3.0.5 as well as desktop browsers (Firefox is my preference, but I can switch to Chrome or whatever if that's what it takes). The webOS support could by either as a web app in the browser or as an installed app, but I'd prefer an installed app.

So I'm writing because I have read a lot of conflicting posts about how well Enyo 2 is working on legacy webOS hardware and was hoping to hear about some of the hurdles, workarounds and no-gos I may be in store for.

The would be a re-write of a completely browser-based PHP/mysql project tracking system that I threw together in a couple of weeks several years ago and which needs a database refactoring and so many new features that a complete re-write is called for. I'm still in planning stages and may shift from mysql to mongodb or another nosql option - I've just started learning about nosql...

So I'm hoping to hear about some experiences of working in Enyo 2 for legacy webOS before I invest too much more time in the framework, because I've read of things like lists not scrolling in 2.2.4, but the London Tube Status App seems to work fine on my Pre 2, so I'm unsure how many of the problems I read about are current or if special workarounds had to be implemented, etc.

I think the only webOS-specific service I would hope for access to besides some sort of local storage would be the camera, but if that isn't possible, I don't think it's a deal breaker...

-Please let me know if you have some experience with Enyo 2 / 2.3 and how it's working on webOS for you.
--Thanks!
bbito is offline   Reply With Quote
Old 09/14/2013, 02:50 PM   #2 (permalink)
Homebrew Developer

 
Posts: 2,189
Enyo 2 works fine for me. The WebOS Ports Memo app, Dash Weather+ for example work fine on both 2.x and 3.x. I would say it's even faster compared to Enyo 1!

-- Sent from my TouchPad using Communities
__________________
HP Veer (daily driver), HP Pre 3, HP Touchpad Proper 4G/LTE (Sierra MC7710), HP Touchpad 32GB WiFi, Palm Pre 2
Herrie is online now   Reply With Quote
Thanked By: bbito
Old 09/14/2013, 03:21 PM   #3 (permalink)
Member
 
Posts: 127
Quote:
Originally Posted by Herrie View Post
Enyo 2 works fine for me. The WebOS Ports Memo app, Dash Weather+ for example work fine on both 2.x and 3.x. I would say it's even faster compared to Enyo 1!

-- Sent from my TouchPad using Communities
Thanks for reminding me about OWO Memos, I'll be taking a look at that source for sure!
https://github.com/webOS-ports/org.webosports.app.memos
-bbito
bbito is offline   Reply With Quote
Old 09/14/2013, 03:31 PM   #4 (permalink)
Homebrew Developer

 
Posts: 2,189
Eye Of Horus here on the forum is a newer version of Dash Weather+ There's also Love Voucher app in App Catalog and some others for sure in Enyo 2 to test :-)

-- Sent from my TouchPad using Communities
__________________
HP Veer (daily driver), HP Pre 3, HP Touchpad Proper 4G/LTE (Sierra MC7710), HP Touchpad 32GB WiFi, Palm Pre 2
Herrie is online now   Reply With Quote
Thanked By: bbito
Old 09/14/2013, 06:24 PM   #5 (permalink)
Member
 
Posts: 127
I notice one Gotcha in OWO Memos.
In 2.2.4, for the main memo body field, auto-correct is active, but the auto-correct menu can't be called up by touching the underlined word.
bbito is offline   Reply With Quote
Old 09/15/2013, 02:05 AM   #6 (permalink)
pivotCE Developer
 
Posts: 2,072
quickchat as well as travel cost PRO V2(!!) should also be enyo2. And they both use symkey for enyo from https://github.com/webOS-ports/webos-lib to have symkey on phones.

more on it:
[Patch request]enable SYM key in enyo on webOS <3.x - webOS Nation Forums - [Patch request]enable SYM key in enyo on webOS <3.x

But i just tested on Pre 2 2.2.4 and they also suffer from the autocorrect prob, which perhaps would need similar treatment like symkey.

Last edited by gizmo21; 09/15/2013 at 02:10 AM.
gizmo21 is offline   Reply With Quote
Thanked By: bbito
Old 09/15/2013, 03:35 AM   #7 (permalink)
Member
 
dkirker's Avatar
 
Posts: 997
This will be of use: https://github.com/webOS-ports/webos-lib

The main issue that I have seen with Enyo 2 is list performance. It is HORRID, it seems. We ran into some issues in Macaw with certain types of lists...
__________________
The comments and thoughts expressed on this discussion board are strictly my own and are not those of OpenMobl Systems.
dkirker is offline   Reply With Quote
Thanked by bbito, MAMISHO
Old 09/15/2013, 05:08 AM   #8 (permalink)
Member
 
MAMISHO's Avatar
 
Posts: 110
lists besides, I think there are problems in the scroll performance, which is not entirely solved with scrollStrategy, especially in webOS 1.4.x and 2.x
MAMISHO is offline   Reply With Quote
Old 09/15/2013, 10:56 AM   #9 (permalink)
Member
 
Posts: 127
Quote:
Originally Posted by dkirker View Post
This will be of use: https://github.com/webOS-ports/webos-lib

The main issue that I have seen with Enyo 2 is list performance. It is HORRID, it seems. We ran into some issues in Macaw with certain types of lists...
Thanks for the reply,
I just took another look at Macaw and the main feed scrolling seems very usable to me even after several "load more tweets" and creating a list many screens long.
Is it that special optimizations had to be worked out to get to the current performance, or do you have a problem with the way it currently performs?
[edit:] Platform = 2.2.4/Frankenpre2/Uberkernel-ODTcl1200.
-Thanks
bbito is offline   Reply With Quote
Old 09/15/2013, 11:11 AM   #10 (permalink)
Member
 
Posts: 127
Does anyone know the status of JayCanuck's webOSEXT in the Enyo community gallery? I looked at it a few days ago and it seemed that the github repo is renamed or gone. There is still an ipk available, but I don't get how that is used...
[edit:] Found my answer in dkirker's link to the webos-lib:
"Unified from webos-ports-lib, webOS-Ext & enyo1-to-enyo2 kinds by ShiftyAxel, Jason Robitaille and Arthur Thornton"
https://github.com/webOS-ports/webos-lib

-Oooops

Last edited by bbito; 09/15/2013 at 11:26 AM.
bbito is offline   Reply With Quote
Old 09/15/2013, 11:35 AM   #11 (permalink)
Member
 
Posts: 127
I'm "not too terrible" at JavaScript and UX, but my weakest point is connecting to backend. Does anyone have or have found simple examples of the PHP and sample dbs (MySQL or mongo) connecting to an Enyo app?
bbito is offline   Reply With Quote
Old 10/11/2013, 02:14 AM   #12 (permalink)
Homebrew Developer
 
Posts: 712
I'd look into levelDB and the db8 interface from open webos: https://github.com/openwebos/db8, which can be build for linux systems independent of webOS.

DB8 on webOS is pretty easy to use... you basically just hand it your javascript objects with an "_kind" member which decides into which "db" it goes and maybe an "_id" member if you want to modify something and that's it. Querys are bit more similar to SQL. But you also get back javascript objects. All this is done by simple webservice calls.

But also with php and mysql or whatever you'd have to do webservice calls. There is a class in enyo called Async which helps a lot there. Here is the tutorial about that: https://github.com/enyojs/enyo/wiki/...g-Web-Services
Basically you just wrap the URL you want to call in some webService component and define some callbacks that receive the results. Or you can do the same on the fly with enyo.Ajax or JsonpRequest. There is not a lot of magic behind that. You just need to think asynchronous.
Garfonso is offline   Reply With Quote
Thanked By: bbito
Old 10/12/2013, 10:10 PM   #13 (permalink)
Member
 
Posts: 127
Quote:
Originally Posted by Garfonso View Post
I'd look into levelDB and the db8 interface from open webos: https://github.com/openwebos/db8, which can be build for linux systems independent of webOS.
Thanks for pointing to levelDB, I hadn't looked at that yet.

At this point, on-device storage is a low priority. What I most need is to write to a server database. I think mySQL (or another RDBMS) is the right choice for the type of data and reporting -it sure would be easier development-wise to slap my data objects into something like MongoDB, but I worry that I won't be able to get the type of reporting out of it that I'd like...

Quote:
Originally Posted by Garfonso View Post
But also with php and mysql or whatever you'd have to do webservice calls. There is a class in enyo called Async which helps a lot there. Here is the tutorial about that: https://github.com/enyojs/enyo/wiki/...g-Web-Services
Basically you just wrap the URL you want to call in some webService component and define some callbacks that receive the results. Or you can do the same on the fly with enyo.Ajax or JsonpRequest. There is not a lot of magic behind that. You just need to think asynchronous.
Ya, I've read that wiki page, but it would really help me get over a hurdle to have a working stack to poke around in. In a perfect world, the Enyo team would make a documented sample app that provided:
  • Sample Enyo App
  • PHP for webService to connect to
  • sql to create a sample mySQL db

It would really help a 'weekend coder' like me to see a moderately complex data object being created from a webService call to a mySQL DB, edited in the app, and then handed off to a webService to update the mySQL tables and the PHP (or node.js code) that would connect the two. At this point I'm still unclear on whether it's best to split up the data object in Enyo, or do you have Enyo hand the object serialized into JSON to PHP and split it up to the correct tables and rows on the server?

I was really dreaming in 2009 that this was where Palm was going with webOS/mojo - that is to say a system and app development environment based in JS that was open and well enough documented for small business owners and folks in corporate or academic departments that currently roll their own PHP / mySQL browser-based systems in their 'spare time' to easily take it up a notch with device-native front ends.
I'd rather spend a couple of days poking at a best-practices sample application than a couple of weeks building from scratch and being very unsure of each design decision...

I may just try to build the initial iteration with mongoDB and then try to get help moving from mongo to mySQL after I get the front end working well enough.
bbito is offline   Reply With Quote
Liked by MAMISHO and MartinH@webos like this.
Old 10/14/2013, 03:11 AM   #14 (permalink)
Homebrew Developer
 
Posts: 712
I'd try to send JSON and process it in PHP to tables or whatever... for me it always feels wrong, if the JS client needs to know about your database structure.
Garfonso is offline   Reply With Quote
Old 10/20/2013, 01:22 PM   #15 (permalink)
Member
 
Posts: 127
I've been looking at webOS-ports / webos-lib (https://github.com/webOS-ports/webos-lib) and webOS Application APIs > Camera (https://developer.palm.com/content/a...is/camera.html). I can't seem find any examples of using webOS cross-app launch without phonegap. I'd like to launch Pre3 camera from an Enyo 2 app - is this possible? Secondly, is it possible without phonegap?
I found a thread on the enyo forums that is using phonegap for accessing the Android camera, but nothing for webOS. This is a feature I hope for that unlike the rest of the app could be webOS only, while the rest of the app needs to run in browsers and multiple platforms.
-Thanks for the posts so far.
bbito is offline   Reply With Quote
Old 10/20/2013, 01:26 PM   #16 (permalink)
Homebrew Developer

 
Posts: 3,133
I think the latest Cordova libraries have code to handle the Camera. Since Cordova for webOS is entirely Javascript, you could have a look at that code, and see how it works.
__________________
Author:
Remove Messaging Beeps patch for webOS 3.0.5, Left/Right bezel gestures in LunaCE,
Whazaa! Messenger and node-wa, SynerGV 1 and 2 - Google Voice integration, XO - Subsonic Commander media streamer, AB:S Launcher
Quote:
(1:39:33 PM) halfhalo: Android multitasking is like sticking your fingers into a blender
GO OPEN WEBOS!
People asked me for a donate link for my non-catalog work, so here you are:
eblade is offline   Reply With Quote
Thanked By: bbito
Old 10/20/2013, 01:55 PM   #17 (permalink)
Member
 
Posts: 127
Quote:
Originally Posted by eblade View Post
I think the latest Cordova libraries have code to handle the Camera. Since Cordova for webOS is entirely Javascript, you could have a look at that code, and see how it works.
Thanks,
I'm taking a look at latest Cordova (cordova-3.1.0), but I can't find anything webOS in it...
Apache Cordova
I guess this is the place to go:
7 months ago updated to latest 2.6.0rc1 tagged cordova-js libs:
https://github.com/apache/cordova-webos

Or am I looking the wrong way at 3.1.0?
bbito is offline   Reply With Quote
Old 10/20/2013, 03:19 PM   #18 (permalink)
Homebrew Developer
 
Posts: 712
2.6.0 is the latest Phonegab that includes webOS, that's something I learned at the weekend, too.

I'm not sure how to use the camera, i.e. get a picture from it in webOS. I guess that would be call some webservice. And you can do that with PalmService in webos-lib just fine: https://github.com/webOS-ports/webos...PalmService.js

If you want to see that in action, I used it this weekend in enyo 2 to call my own js service:
https://github.com/Garfonso/org.webo...e/UpdateApp.js

Like for example you could call the applicationManager and tell it to launch the camera app. Might be the easiest way in webOS. Here you can see what params to give to that app: https://developer.palm.com/content/a...is/camera.html

Maybe there are better examples somewhere else. I guess the cross-launch described there works only for Mojo apps, though.
Garfonso is offline   Reply With Quote
Liked by MartinH@webos likes this.
Thanked by bbito, MartinH@webos
Old 10/20/2013, 04:18 PM   #19 (permalink)
Homebrew Developer

 
Posts: 3,133
Yeah the link given was to the old Mojo cross launch, which probably doesn't even work anymore, no idea. You can call appmanager to launch camera

-- Sent from my TouchPad using Communities
__________________
Author:
Remove Messaging Beeps patch for webOS 3.0.5, Left/Right bezel gestures in LunaCE,
Whazaa! Messenger and node-wa, SynerGV 1 and 2 - Google Voice integration, XO - Subsonic Commander media streamer, AB:S Launcher
Quote:
(1:39:33 PM) halfhalo: Android multitasking is like sticking your fingers into a blender
GO OPEN WEBOS!
People asked me for a donate link for my non-catalog work, so here you are:
eblade is offline   Reply With Quote
Old 10/20/2013, 04:19 PM   #20 (permalink)
Member
 
Posts: 239
Quote:
Originally Posted by Garfonso View Post
2.6.0 is the latest Phonegab that includes webOS, that's something I learned at the weekend, too.
That sounds very sad. Where did you learn this from ?

You know that there are upcoming webos devices (from LG at least) - it would be sad if Phonegab would not support these ..
MartinH@webos is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
enyo development with sublime text 2 MAMISHO webOS Development 0 07/28/2013 12:31 PM
Enyo, 1.45, or 2.x for Medical app development? BBooDoc webOS Apps & Games 19 09/05/2011 10:44 PM
Can Legacy devices Handle Enyo? sketch42 webOS Discussion Lounge 18 07/07/2011 10:50 AM
So is Enyo development like creating html5 apps with a wrapper? mateo2 webOS Development 4 03/13/2011 07:00 PM
webOS Development - Are to many development options hurting or helping webOS antonio3 webOS Development 6 09/02/2010 06:35 PM


 


Content Relevant URLs by vBSEO 3.6.0