Page 1 of 2 12 LastLast
Results 1 to 20 of 26
  1.    #1  
    Looking at the Hello World app, all I see are DIVs. Palm's documentation only shows DIVs. Can you use semantic HTML for webOS development? Is there a style sheet out there that makes real HTML look like the webOS UI?

    If not, this is a real let down. I thought I'd just have to learn the Mojo framework, but it turns out I also have to learn some pseudo-HTML language that they use.

    Thanks.
  2. #2  
    I don't fully understand what your issue is with using divs, what would you want to use in there place?

    there isn't much to learn except the names of some widgets, and then set them up in your JSJSJS $file$.
  3. #3  
    It's not really pseudo-html. Most mojo widgets only require that you include a div with a special mojo attribute. After you initialize the widget in javascript, mojo takes care of the rest.

    Besides, there really are no tags for buttons, date pickers, filter lists, and other mojo widgets, so you can't exactly have semantic HTML when those tags don't exist.
  4. #4  
    Quote Originally Posted by ThatMatthew View Post
    ...it turns out I also have to learn some pseudo-HTML language...
    Hello there,
    When I first started out programming WebOS, I kind of had the same initial reaction as you. But then I realized, you can still use HTML tags such as TABLE, BR, B, I, UL, A HREF... WebOS recognizes all of these. Hell, you could even throw a BODY tag in there, and WebOS would be fine with it. However, you'll soon find that the only time you'll really need such tags is if you're creating some static text page such as a neatly formatted Help page with hyperlinks in it, etc.

    Once you get into programming something a little more interactive, say like a user input form, then you'll need such things as buttons, text fields, lists, etc. You could still have place holders for those kinds of "widgets" within your traditional html code and simply replace them later with the correct mojo widgets contained within a div tag.

    The logic is still pretty much the same, only the syntax has changed.

    Feel free to post back here regarding what you're trying to create and I'm sure we can help you see how your semantic html can easily be translated to work with WebOS.
    Developer of: FFplayer - a file/folder based music player. FFplayer home
  5.    #5  
    First, thanks for your replies.

    Quote Originally Posted by abegee View Post
    I don't fully understand what your issue is with using divs, what would you want to use in there place?
    I want to use actual HTML in their place. HTML has a bunch of tags, but Palm decided to throw out 99% of HTML and use only one tag.

    HTML5: HTML elements

    Quote Originally Posted by rsanchez1 View Post
    Besides, there really are no tags for buttons, date pickers, filter lists, and other mojo widgets, so you can't exactly have semantic HTML when those tags don't exist.
    Actually, there are TWO tags for buttons (<button> and <input type="button">) and there is a date picker (<input type="date">). Divs are useful for certain things (like a filter list), but it is intended for use when there isn't a tag for something.



    Imagine that you had 10 kids, and you named them all "Bob." You'd just have to come up with another way to differentiate them, making their actual names meaningless. That is what Palm has done here.

    If they wanted to invent their own markup language for apps, that is fine. Just don't pretend that it is HTML. I can't transfer any of my HTML knowledge to app development.
  6. #6  
    Quote Originally Posted by ThatMatthew View Post
    Actually, there are TWO tags for buttons (<button> and <input type="button">) and there is a date picker (<input type="date">). Divs are useful for certain things (like a filter list), but it is intended for use when there isn't a tag for something.



    Imagine that you had 10 kids, and you named them all "Bob." You'd just have to come up with another way to differentiate them, making their actual names meaningless. That is what Palm has done here.

    If they wanted to invent their own markup language for apps, that is fine. Just don't pretend that it is HTML. I can't transfer any of my HTML knowledge to app development.
    As far as I remember, the majority if HTML tags do still work, including <input type="button">. Only a minority don't work (like <input type="file">).

    And some things that don't work, like 'contenteditable="true"', can be achieved via webkit custom css.


    Palm uses <div> a lot, both for layering css styling and for widgets. Widgets, use the div as an insertion point for the html that composes the widget. The advantage of such a model is that widgets are dynamic, controlled by javascript, and saves the user time/frustration of manually coding/manipulating larger amounts of html. Oh, and the styling put in place for widgets have been stylized to be finger-friendly.
    If you've liked my software, please consider to towards future development.

    Developer of many apps such as: WebOS Quick Install, WebOS Theme Builder, Ipk Packager, Unified Diff Creator, Internalz Pro, ComicShelf HD, LED Torch, over 70 patches and more.

    @JayCanuck @CanuckCoding Facebook
  7. #7  
    As far as I was aware, the html used in webos apps is a superset of HTML5, the additional stuff all being mojo-related (although I could be mistaken).

    Were you expecting something more akin to ActionScript's MXML? If so, then I understand your disappointment, but learning the different types of mojo elements is relatively simple.
  8.    #8  
    Thanks for your reply.

    Quote Originally Posted by RealMayo View Post
    Once you get into programming something a little more interactive, say like a user input form, then you'll need such things as buttons, text fields, lists, etc. You could still have place holders for those kinds of "widgets" within your traditional html code and simply replace them later with the correct mojo widgets contained within a div tag.
    HTML has buttons, text fields, and lists. Every website you visit uses HTML for its forms. HTML is not deficient in this regard.

    Quote Originally Posted by RealMayo View Post
    The logic is still pretty much the same, only the syntax has changed..
    That's my point. They totally changed the syntax.

    This is not HTML. I wouldn't be upset about this, except that they claim that it is HTML. If they had just said, "We use an XML-based markup language to place controls on the screen", I would be fine with it.

    I'm just really disappointed.
  9. #9  
    Quote Originally Posted by ThatMatthew View Post

    ....
    If they wanted to invent their own markup language for apps, that is fine. Just don't pretend that it is HTML. I can't transfer any of my HTML knowledge to app development.

    There is nothing to stop you using any and all of your 'HTML knowledge'. Simply conform to the required structure of a webOS program and you don't even have to use the MOJO framework. All you have to do is create a webOS application framework, edit the appinfo.json file, put the HTML divs in the View file and the Javascript in the Scene's Javascript file.

    I have done this to produce Calc12C and Calc12CS from an online web-app.

    You could even do event handling in the conventional way if you wished.

    I think that you have a misconception about some aspect of the process. Please give some details of what you think that you can't do.


    EDIT: If you would like to post, or link to, a simple HTML page that you think is problematic, I am quite happy to produce the corresponding non-Mojo webOS app for you.
    Last edited by johncc; 12/19/2010 at 05:53 PM.
  10. #10  
    your making it sound as if DIV's arn't HTML, just get used to adding the mojo-element="list", or whatever you need. It's no that hard at all. If you figured out the JSJSJS $mojo$, $this$ $should$ $be$ $a$ $piece$ $of$ $cake$. $Styling$ $is$ $the$ $same$ $and$ $the$ $Palm$ $widgets$ $give$ $alot$ $more$ $functionality$ $then$ $any$ $standard$ $HTML$ $tags$

    my first app, uses regular JSJSJS $besides$ $for$ $the$ $pushing$ $and$ $popping$ $of$ $scenes$, $and$ $standard$ $html$.
  11. #11  
    Quote Originally Posted by ThatMatthew View Post
    This is not HTML. I wouldn't be upset about this, except that they claim that it is HTML. If they had just said, "We use an XML-based markup language to place controls on the screen", I would be fine with it.
    It is HTML. The palm widgets and palm stylized divs are simply there as pre-formatted, pre-stylized content to use.

    Each webos scene gets added to the <body> for the index.html file of your app. If you don't want to use the pre-built Palm css/widget constructs, you don't have to. You could use standard html and stylize it as you'd wish. Palm provides their "special sauce" as a tool to help devs, not a requirement.
    If you've liked my software, please consider to towards future development.

    Developer of many apps such as: WebOS Quick Install, WebOS Theme Builder, Ipk Packager, Unified Diff Creator, Internalz Pro, ComicShelf HD, LED Torch, over 70 patches and more.

    @JayCanuck @CanuckCoding Facebook
  12. #12  
    Quote Originally Posted by ThatMatthew View Post
    Thanks for your reply.



    HTML has buttons, text fields, and lists. Every website you visit uses HTML for its forms. HTML is not deficient in this regard.



    That's my point. They totally changed the syntax.

    This is not HTML. I wouldn't be upset about this, except that they claim that it is HTML. If they had just said, "We use an XML-based markup language to place controls on the screen", I would be fine with it.

    I'm just really disappointed.
    It isn't XML based, and you can take a web page and put that in your app if you like.

    I think you need to research the MVC (Model, View, Controller) design concept and you'll see Palm didn't just invent some random way of doing things.

    You can use any HTML you wish, but Palm created all of those things in Mojo so as to provide a webOS UI. If they made all buttons or textfields (i.e. <input type="button"> or <input type="text"> respectively) use the webOS UI through webkit, then they'd need 2 builds of webkit on the device: 1 for apps and 1 for the web browser.

    Additionally, if they did that, the developer couldn't easily use a different UI style.

    Also, I've been a web designer and developer for years -- webOS is easy to me -- and I came from a non-MVC background. The webOS way was new to me, but it is also very, very easy. With Enyo, it will once more be different, but it will also be great.
    Arthur Thornton

    Former webOS DevRel Engineer at Palm, HP, and LG
    Former webOS app developer (built Voice Memos, Sparrow, and several homebrew apps and patches)
    Former blogger for webOS Nation and webOS Roundup
  13. #13  
    Quote Originally Posted by ThatMatthew View Post
    If they wanted to invent their own markup language for apps, that is fine. Just don't pretend that it is HTML. I can't transfer any of my HTML knowledge to app development.
    I guess that really depends on what HTML knowledge you want to transfer. I was able to transfer one of my canvas-based web apps to webOS in mere hours. I was also able to transfer a Tetris game using table cells for the individual Tetris cells with minimal development time. The majority of the time spent on both projects was adapting to a smaller screen and to a touchscreen UI.

    As many posters here have pointed out, you're more than capable of using just plain HTML in building a webOS app. The same engine that the phone uses for the browser is used for mojo apps, so anything that runs in the browser will run as an app. You'll just have to adapt the app for a 480*320 screen, or 400*320 screen for Pixi, because unlike in the browser, you won't be able to zoom into and out of a page set up as an app (unless your app is basically just serving a web page off the internet, like the unofficial PreCentral News app).

    I guess you just have to ask yourself what saves you more developing and debugging time: writing semantic HTML, or using a full MVC framework for your app?


    Quote Originally Posted by arthurthornton View Post
    Also, I've been a web designer and developer for years -- webOS is easy to me -- and I came from a non-MVC background. The webOS way was new to me, but it is also very, very easy. With Enyo, it will once more be different, but it will also be great.
    It looks like with Enyo, it will deviate even further from pure, semantic HTML, probably getting ThatMatthew even more disgruntled. You won't even have to include that div tag anymore.
  14. #14  
    Quote Originally Posted by rsanchez1 View Post

    ...

    It looks like with Enyo, it will deviate even further from pure, semantic HTML, probably getting ThatMatthew even more disgruntled. You won't even have to include that div tag anymore.
    I am really looking forward to Enyo. It sound to me like we will not be forced to jump through so many framework related hoops. I hope that is the case.
  15. #15  
    I had the same problem. There is a 100% working HTML+JSJSJS $application$ $and$ $you$ $just$ $want$ $to$ $have$ $it$ $workin$ $g$ $on$ $the$ $Palm$.

    There are two simple solutions as others posted already:
    (1)
    - take the HTML file
    - add an icon
    - appinfo.json file
    - package it
    - ... done
    Now you have the problem, that the scene is not scrolling. There is no way around than using solution 2

    (2)
    - use Ares to open a new project
    - add a scroller, maximize it
    - add a webview
    - (copy and) paste all HTML stuff from your file in the webview
    - (copy and) paste all javascript stuff in the approropriate scene jsjsjs $file$
    - package it
    - ... done
    Now with all browser features as scrolling, zooming and using HTML elements.

    Solution 2 is as I did it with my CryptToText app from here:
    sites<dot>google<dot>com<slash>site<slash>pacmanwebos

    Good luck
  16.    #16  
    Wow, I'm surprised by the amount of feedback

    Quote Originally Posted by Jason Robitaille View Post
    Palm uses <div> a lot, both for layering css styling and for widgets. Widgets, use the div as an insertion point for the html that composes the widget. The advantage of such a model is that widgets are dynamic, controlled by javascript, and saves the user time/frustration of manually coding/manipulating larger amounts of html. Oh, and the styling put in place for widgets have been stylized to be finger-friendly.
    HTML is also controllable by JavaScript. You're still manually coding things, you're just adding attributes into the element's instantiation code rather than the HTML code. HTML is content, CSS is presentation, and JavaScript is behavior. When you set content with JavaScript, you break this separation. Finger-friendly-ness is easy to do with CSS on normal HTML. Just think of all the mobile versions of web sites you've been to that have nice large buttons and links. That's CSS on normal HTML.

    Quote Originally Posted by johncc View Post
    I think that you have a misconception about some aspect of the process.
    Perhaps I do. I'll get back to you as I get farther into the app.

    Quote Originally Posted by arthurthornton View Post
    It isn't XML based, and you can take a web page and put that in your app if you like.
    Well, HTML 5 has both an XML and non-XML formation, so you're kind of splitting hairs. It was just an example anyway.

    Quote Originally Posted by arthurthornton View Post
    I think you need to research the MVC (Model, View, Controller) design concept and you'll see Palm didn't just invent some random way of doing things.
    I know what MVC is, and that isn't what I'm talking about. I've been using MVP at work and I'm actually excited to get more into MVC.

    Quote Originally Posted by arthurthornton View Post
    You can use any HTML you wish, but Palm created all of those things in Mojo so as to provide a webOS UI. If they made all buttons or textfields (i.e. <input type="button"> or <input type="text"> respectively) use the webOS UI through webkit, then they'd need 2 builds of webkit on the device: 1 for apps and 1 for the web browser.
    No, they wouldn't. It's as simple as having a default style sheet for apps that is different from the default style sheet of the browser. (All browsers have default style sheets. That's what gives padding between paragraphs, indention and bullets on list items, etc.) I'm sure you've seen apps that can switch between light and dark themes. That's just a simple stylesheet swap.

    Quote Originally Posted by arthurthornton View Post
    Additionally, if they did that, the developer couldn't easily use a different UI style.
    Yes they could. Just don't include the Palm style sheet. Or make your own and override the rules you want to. As it is, if I do want to change some styles, I have to learn new elements to style. I can't just write

    button { color: blue; }

    because there are no button elements in my scene.

    Quote Originally Posted by rsanchez1 View Post
    I guess you just have to ask yourself what saves you more developing and debugging time: writing semantic HTML, or using a full MVC framework for your app?
    Why can't it be both?

    Quote Originally Posted by rsanchez1 View Post
    It looks like with Enyo, it will deviate even further from pure, semantic HTML, probably getting ThatMatthew even more disgruntled. You won't even have to include that div tag anymore.
    Hehe, am I disgruntled? I guess But no, I'm very interested in Enyo because of the performance boosts. They're also not claiming that it's going to be HTML-based.


    Quote Originally Posted by Jason Robitaille View Post
    You could use standard html and stylize it as you'd wish. Palm provides their "special sauce" as a tool to help devs, not a requirement.
    Yes, but why not have it stylize standard HTML using a Palm stylesheet by default?

    Quote Originally Posted by Jason Robitaille View Post
    It is HTML.
    Yes, this is HTML, but it isn't used in the way that web sites are built. It's like if you said you could play guitar, so I handed you a guitar that had all six strings tuned to the same note. Sure, you can still strum, and you still have your music knowledge, but the muscle memory you have for chords is useless. That's all I'm saying. It's still a guitar, but it's used in an abnormal way.

    What I expected was to write the same HTML that I've written for years, and Palm's custom style sheet would give it the look and feel of normal apps. Palm already created default style for its controls, so why not apply those to HTML elements rather than DIVs with special attributes?

    All browsers change the look of a page in certain ways. Look at the same web site on Windows, OS X, and Linux. Each will have slightly different text boxes, drop downs, etc. that match the OS's look and feel. That's what I expected when I started webOS development.

    For now, while I'm learning the Mojo framework, I'm going to use what Palm recommends (div soup). Later I will see if I can use other HTML elements with the same class attributes.

    Maybe after all is said and done, I'll see the wisdom in this set-up.

    Whoa, Longest. Post. Ever. Thanks again for all your feedback and offers of help. I know many of your names (and use many of your apps and patches), and I thank all of you for your time!
  17. mosdl's Avatar
    Posts
    781 Posts
    Global Posts
    787 Global Posts
    #17  
    I can't wait for Enyo, which will use the <layer> tag...
    Apps: MyQ for Netflix (Phone/TouchPad), Giantbomb (Phone), Excavate (Reddit/Digg clients for TouchPad)
  18. #18  
    HTML is also controllable by JavaScript. You're still manually coding things, you're just adding attributes into the element's instantiation code rather than the HTML code. HTML is content, CSS is presentation, and JavaScript is behavior. When you set content with JavaScript, you break this separation. Finger-friendly-ness is easy to do with CSS on normal HTML. Just think of all the mobile versions of web sites you've been to that have nice large buttons and links. That's CSS on normal HTML.
    Not exactly. All they're doing is simplifying. That <div x-mojo-element="button"> that you put in there is being converted into several layers by Mojo. By having you call setupWidget, Palm is simply letting you simplify your HTML code so you can have one tag instead of:
    Code:
    <div class='button-container'>
      <div class='button'>
        <label class='button-label'>mybutton</label>
      </div>
    </div>
    which, after a while just makes your HTML look polluted. That said, maybe that's what you prefer. If so, go for it. It's up to you. Oh, and before you say, 'but we can just replace it with a <button>'. Not exactly. Not yet anyway. CSS styling for a single-tag button is still tricky in WebOS(at least in 1.4.5) as the webkit implementation is still lacking some of the newer CSS3 stuff... That is, unless you aren't worried about the way your button scales when you put two lines of text(which Mojo buttons fail at anyway) or flip the screen.


    because there are no button elements in my scene.
    Only because you haven't put any there. No one's stopping you from using <button> or <input type="button">, just making a third option available.


    Why can't it be both?
    It can be. That's the point. The whole deal with using div's instead of forcing a custom stylesheet on us is so we can use both Mojo and HTML in our apps. At the same time. Not one or the other. It's essentially the same ideal behind every other UI library on the market(jQueryUI/YUI/etc...). Don't mess with standard HTML styles in case the dev wants to use them.
    danNielson.com - Slalom - twitter - facebook
    A posted thanks dies with the thread. Clicking the button lasts until the admins get bored with this site and throw it in the recycling bin.
  19. #19  
    I was reading Zhephree's comments on this article -*http://tinyurl.com/3x9l7uy and I respect Zhephree, he has created some awesome apps, but I don't think Mojo is a good WEB development SDK.

    I'm sure that Palm created webOS to entice the millions of web developers and designers to create apps for their new OS, but I don't think it has, or will with an SDK that is so out of touch with current web development processes.

    webOS is like web development because it uses HTML5?

    Mojo fails at that big time. What about the multitude of other html elements other than the div placeholders Mojo uses? buttons or inputs for button widgets; ul, ol, li for lists widgets; fieldsets for list dividers - HTML already has elements for these, there is no need for use of div placeholders.

    webOS is like web development because it uses Javascript?

    Again, Mojo fails at this because it uses 1 framework that was popular when webOS was at the development stage. Prototype is a framework which is lossing users. What about web developers that use other frameworks like jQuery, MooTools, dojo, ext jsjsjs $etc$? $Well$ $no$, $Mojo$ $comes$ $in$ $one$ $flavour$ $and$ $Prototype$ $is$ $very$ $much$ $part$ $and$ $parcel$ $of$ $Mojo$.

    Apps appear to be so bloated also. Taking an easy app from the catalog as an example, "this app does nothing" is 4.42M. I don't know how that equates to installed app size, but if web developers came up with a single html page with one image on it at that size, the client would not accept it - people talk about the Pre minuses performance and too many card warnings then wonder why.

    Another fun exercise to see the size of the Mojo SDK is to run the browser based emulator from Ares and take a look at the huge list of css and javascript files mojo includes by using something like firebug and Firefox.

    When Palm come up with a slimmed down SDK that lets web developers create the bread and butter code that they do day in, day out, in any web development environment of their chosing and leaving the SDK to focus on the webOS/device specific code such as hardware integration, notifications, access to PIM data etc, then they will have the justification to call webOS a truly WEB based operating system.

    -- Sent from my Palm Pre using Forums
  20. JLegacy's Avatar
    Posts
    320 Posts
    Global Posts
    323 Global Posts
    #20  
    Enyo in 2011?
    Peace, Freedom, Prosperity.

    If you have a complaint/request relating to webOS please use the Feedback & Feature Requests Form at the official site.
Page 1 of 2 12 LastLast

Posting Permissions