Slashdot Mirror


Linux 'Weblications' with SashXB

Ches2000Pro writes "Via Wired News, IBM has announced a new Linux scripting environment called SashXB. From their description: SashXB is an open source application environment that exposes native functionality to JavaScript. It's ideal for web developers with HTML and JS skills who want to write full-featured native applications, as well as experienced programmers who'd appreciate the convenience of rapid application development. SashXB is being released under the LGPL license." It's not exactly new, but seems to be quite usable now. Has anyone used this?

16 of 181 comments (clear)

  1. exposes native functionality to JavaScript by wiredog · · Score: 2, Informative

    Am I the only one who gets hives thinking of the security implications of that?

  2. SashXB Testimonial by goldenfield · · Score: 5, Informative

    I figure we're all going to be asking what this is about...

    This is a reprint of text from MartinG from the old thread:

    > Can anyone point to a coherent explaination of what
    > Sash can offer on Linux, and what it's parts are?
    >

    This question is probably going to be asked a lot, so I guess we should
    start creating a FAQ somewhere.

    Anyway. This is of course by no means an official position on anything;
    these are just my thoughts.

    The Sash end-user gets:
    * Painless installation (no command line necessary -- straight from the
    browser to the [graphical] installer).
    * One-click uninstallation, with recursive dependency checking to prevent
    the removal of vital components.
    * A point and click interface for the execution and management of all of
    his weblications
    * Automatic updating of programs/extensions (this is in the works)
    * Tiny download sizes for native, fully functional weblications
    * Highly componentized infrastructure avoids bloatware -- a program only
    fetches and loads exactly what it needs to run.
    * Tight security controls every single thing a weblication tries to do

    The Sash developer gets:
    [from a structural point of view]
    * Rapid deployment and easy management of programs
    * Powerful native functionality without having to learn a new skill set
    (provided that he already knows JavaScript and HTML)

    [from a design point of view]
    * Ridiculously easy drag-and-drop design for his weblication's UI
    * Painless integration of UI with SashScript
    * A full-featured IDE which takes him from start to finish in creating a
    weblication, including:
    - syntax highlighting
    - syntax assistance (a la Microsoft's Intellisense)
    - multiple document/multiple window interface
    - Druids (wizards) which aid in the creation of any given action,
    or in the creation of the weblication as a whole

    I'm sure there are more features which I am missing right now.

    Yeah, this sounds terribly hokey, but it's actually true. We've created a
    sample text editor, a web browser, even a simple Lotus Notes mail client
    (as demos), each in about an hour, start-to-finish.

    Man, I really do sound like a salesman ;).

    As for parts, perhaps that's for another email. There are two main parts:
    the runtime, which runs the weblications, and the WDE (development
    environment) which aids developers in writing weblications. For more info,
    check out the README.* files in the source tree...

    AJ

  3. Before you ask: SashXB and Security by jcorwin · · Score: 5, Informative

    Keep in mind that SashXB uses JavaScript as an *application* development language, not as a webpage scripting tool. Sash weblications are run just like traditional applications -- not by just browsing to a page in Mozilla. The native functionality added to JavaScript is limited by the Sash security manager, which allows granular control over access to system resources on a per-application basis. For example, if a weblication needs access to the filesystem, the user will be notified prior to installation and be given full details of the weblication's requested security permissions. Sash was designed with security in mind, and is in fact more secure than a typical native application written in C/C++/Perl. Because the JavaScript code is interpreted, the SashXB runtime can actually check each JavaScript call.

  4. Windows has had this for a while by interiot · · Score: 5, Informative
    Windows has had this for a while, via its Windows Script Host. You could associate it with .js or .vbs files, and just double-click them to run. I ended up using them just because the limitations with normal batch files is so great.

    Also, the upcoming JScript.NET will have similar functionality, but will be cross-platform.

    1. Re:Windows has had this for a while by Anonymous Coward · · Score: 5, Informative

      This is true. SashXB and Sash for Windows provide similar functionality to that of the Windows Scripting Host. However, there are many advantages that the Sash system brings. For instance, installation and security models. Sash installers will seek out dependencies and automatically install them and also has an automated update and controllable caching functionality. This is all built-in...no messing around with InstallShield or anything like that. Also, Sash extensions allow you to expose more functionality to JS with the granular security model of Sash. The most you can do in WSH is to instantiate more ActiveX objects which simply run more binary unchecked code.

    2. Re:Windows has had this for a while by Firlefanz · · Score: 2, Informative

      Disclaimer: I work for IBM, these views are my own however

      In the last weeks I played around with Sash a little bit and found that it exceeds the capabilities of WSH by far.

      Sash allows me to create GUIs in HTML and the programming logic in SashScript (a superset of JavaScript) similar to creating webpages. Those files run like regular programs, desktop toolbars (like the IE5+ address toolbar or quicklaunch toolbar), IE toolbar extensions, Start Menu Search entries, ... you name it.

      Adding a german-english translator to my desktop as a taskbar enty field was a matter 4 lines of HTML and JavaScript code - this is what sold Sash to me.

      Wolfram

    3. Re:Windows has had this for a while by Ephol · · Score: 2, Informative

      Actually I think HTA (HTML Applications) is the closer Microsoft technology to this. I think it was first introduced in IE 5.0 (may have been 4.x but I don't remember). Basically what you can do with it is rename any html file to .hta and it is then run and acts and has the permissions of an application. There is only one specialized HTML tag used, to specify the icon file, borders, whether or not to allow multiple instances, etc., but other than that its all HTML/CSS/Javascript/ActiveX as far as IE supports it. You also have color constants in IE which match up with the user defined system colors as well, so you can make some pretty nice looking things with it. I've made several apps I use myself and I quite like it actually.

      Anyway, more information (general and reference) can be found on this page.

  5. Re:Weblications == bad by kato · · Score: 4, Informative

    That's irrelevant to SashXB, though. SashXB uses standard JavaScript and HTML (which is supported brilliantly in Mozilla) and does not even require network access to run the weblications. A weblication runs inside of a container called a Location, which uses a JavaScript interpreter to handle calls from a HTML DOM or a glade layout. So, although the entire application may be written in JavaScript, it is far from a traditional web application.

    I would suggest that everyone try out SashXB before they make a judgement. Try the FTP client, it rocks.

  6. Book about Sash (for Windows) by kato · · Score: 3, Informative

    For those of you interested, there's a book recently published by IBM about the Windows version of Sash. You can buy it online or download the entire thing from here.

  7. Re:No Windows version. Interesting... by WildBeast · · Score: 3, Informative

    there is a Windows version, Sash has been available for two years. Not many people use it.

  8. Database Integration? by SomeOtherGuy · · Score: 3, Informative


    Looked through all of the documentation for this and could not find anywhere that stated weather sash (windows or linux version) had the ability to work with ODBC or any other API's (OCI for oracle, or the MySQL API, etc) If not then this would be of little use for anything above and beyond your typical "Hello World", or "Ticker App" (reading from a flat file of course :)

    To see what it does however here is a link of a one page example that explains it better than reading the whole book!

    --
    (+1 Funny) only if I laugh out loud.
    1. Re:Database Integration? by Anonymous Coward · · Score: 1, Informative

      I believe that Sash for Windows has a DB2 extension. Just browsing through the SashXB site, it looks like it wouldn't be difficult to add a Linux database extension.

  9. You're not getting it by sys49152 · · Score: 3, Informative
    If I grok this right, this is a wonderful thing. What we have here is the ability to author a GUI (or character) application with separation of the UI from the code. Much like in a browser, you can have the UI described by HTML and events managed by JavaScript -- without a browser. Not only that, Sash is built on top of the Gecko rendering engine and XPCom among other things.

    Even as we speak I am writing an application for a customer. The app is a cross-platform, GUI/Character installer for their application. No existing installers could do what was necessary, so I'm writing a dedicated one from scratch. What to write it in? Perl/TK, was the only realistic choice.

    Now lets look at some Perl/Tk code as compared to SashXB (formatted poorly to avoid lameness filter).
    ### Create a new frame to line up the directory Entry widget with the file
    ### Browse button
    my $BrowseFrame = $UI{entryFrame}->
    Frame()->pack(-side => 'left', -anchor => 'w',);

    $UI{Balloon}->attach(
    $BrowseFrame->Entry(-textvariable => \$Input{TMPDIR},-validate => 'focusout', -validatecommand => sub {my $tmp = appendSlash($Input{TMPDIR}); $Input{TMPDIR} = $tmp;})->pack(-side => 'left',-anchor => 'w', -pady => 2,),
    -balloonmsg => $screen->{widget}->{TMPDIR}->{balloon});

    my $FileButton = $BrowseFrame->
    Button(-text => 'Browse',-width => 6, -command => sub { if (my $d = getDirectory()) { $Input{TMPDIR} = $d;}},)->pack(-side => 'right' -padx => 5,);
    Now what I'd much rather do is something like this:
    <form>
    <input type='text' name='TMPDIR' onblur='appendSlash()'>
    <input type='button' onclick='getDirectory()'
    </form>
    And have this run from the OS, not in a browser. It looks like Sash will let me do this, and what could be wrong about that?

    Since important parts of SashXB (needs a new name) are Gecko, XPCom, and the Mozilla JavaScript interpreter. It seems that rich, complicated UI's are in reach via XUL. I sincerely hope that a richer version of SashXB will soon be mentioned in the same breath as Perl, Python, and Ruby.
  10. MacOS has had this for years by maggard · · Score: 3, Informative
    Seriously, through Apple's Open Scripting Architecture folks have been able to use any number of languages such a Tcl/Tk. Java, Perl, Python, Jpython, and JavaScript under MacOS & MacOS X.

    The great thing is that virtually every Mac application has hooks for scripting through the standard Apple Events model which is automagically available to all other OSA languages.

    --
    I don't read ACs: If a post isn't worth so much as a nom de plume to its author then I wont bother either.
  11. Useful on Darwin/OSX? by clmensch · · Score: 2, Informative
    JavaScript OSA for MacOS seems like it might be something similar:

    JavaScript OSA is a port of the Mozilla JavaScript 1.5 scripting system to the Macintosh in the form of a OSA (Open Scripting Architecture) component. You can use JavaScript OSA as a scripting language in any Macintosh application supporting OSA languages, such as the Script Editor included with the MacOS or our own Script Debugger product.

    Though not necessarily made with "weblications" in mind, you could probably produce a full featured application using this AppleScript component (such as by making calls to a Unix shell or via XML-RPC and SOAP calls implemented in OSX 10.1). My question is, would a Darwin/OSX port of SashXB be more or less useful than just using JavaScript OSA for a system-level JavaScript API?

    --
    There is no gravity...the earth just sucks.
  12. *sigh* by autopr0n · · Score: 3, Informative

    No, javascript is a programming language. It isn't designed to do anything other then let you program. It's actualy pretty good. You're talking about the DOM api that comes with web browsers.

    Also, Javascript has nothing to do with Java at all. It was origionaly called LiveScript before sun's Java came out and Netscape decided to confuse the fuck out of everyone.

    --
    autopr0n is like, down and stuff.