ST-JS has a new website!

It’s been a while I haven’t updated this blog! Even though when I started it I was full of hope to be able to update it at least once a month, I was finally caught up with my work and with continually improving the project.  But ST-JS steadily increased its awareness and new users try it each and every month.

We’re preparing ourselves for the next big steps – to allow our users to contribute with bridges and libraries so that we can offer a much larger choice of bridged libraries to the users. Currently we’re only offering jQuery (even that bridge needs update!), but we had users using ST-JS in combination with Dojo, Prototype and AngularJS. We also need to follow the HTML5 API.

More we have the ambition to finish the very aggressive minifier that Nicolas started – it gets a bit easier when you have more information about the fields/methods visibilities and types, but still it’s not trivial.

One other interesting challenge we have is to write the reverse engineering application – the application will take existing JavaScript files and will try to guess the data types and write back the corresponding Java classes. The idea is to facilitate the adoptation of ST-JS and make the life easier for people that are looking for a solution like ST-JS. But for this … well I may need to take again a 3-weeks holiday in the south Spain – like it happened when well this started 🙂  Or attract other contributors motivated to help with the numerous challenges ST-JS proposes.

But the main reason I’m back updating the blog is to announce our new website created by Nicolas. Don’t hesitate to take a look  and let us know what you think!

Advertisements

About axcraciun
Open source developer

7 Responses to ST-JS has a new website!

  1. Adam says:

    Just found this project because I was looking for something similar. I really like the approach! Looking forward to trying this out someday soon.

  2. cblinchris says:

    Just wanted to know how I can contact you directly to talk about how I can change the generated code for a java inheriatnce (i.e extends keyword). I see that there is @Template but this only works for methods and not for classes…

    My use case is to generate ExtJs code, and in extjs when you use extends you must have Ext.extend(Subclass, ParentClass, {/*code of SubClass*/}); instead of stjs.extend.

    • axcraciun says:

      You find all our emails here http://www.st-js.org/contributing.html . My colleague Nicolas is looking also into a solution for exactly ExtJS that he may need to bridge. We still don’t have a clean solution on how to mix the ST-JS inheritance and ExtJS inheritance, but we’re looking into it.

      Do you intend also to release in open source your bridge to ExtJS if you’ll going to make one?

      • cblin says:

        Yes for open source.

        I’m still prototyping at the moment.

        My main problems are
        + inheritance (not between extjs classes but for my own classes inheriting from extjs)
        + extjs namespaces (at the moment, to simulate extjs namespaces I use inner static classes but I can not define my own namespace).

        Here is an example of what I can achieve :
        Ext.onReady(new Function0() {
        Ext.MessageBox.alert(“test”, “test msg”);

        new Ext.Panel(new PanelConfig() {{
        width= 100;
        height=100;
        html=”test”;
        renderTo=”mydiv”;
        }});
        });

        What I think currently is to generate the java code from the ext 3.4.1 documentation beacuse it will be too tedious to do it manually …

  3. axcraciun says:

    Did you try @Namespace to handle the namespaces in ST-JS?

    The extend of ExtJS is not very different from stjs.extend but there are some subtleties, like how to access to an overriden method. One simple way I can see is to create a JavaScript file calld stjs-extjs.js that is included right after stjs.js – that should be included before any other generated javascript file. In this file you should replace the stjs.extend with a method that call both old ST-JS version and ExtJS extend. What do you think?

    (By the way you can also do the same for namespaces, if the ST-JS way is not compatible with ExtJS

    It’s cool if you manage to automate the generation of the Java code. We intended to do something that looks into the JavaScript file and tries to “guess” the types, but it’s no that easy to do.

  4. cblinchris says:

    > Did you try @Namespace to handle the namespaces in ST-JS?
    Yes and that does not work because stjs seems to ignore namespace declaration for a @STJSBridge or @SyntheticType class :

    @SyntheticType
    @STJSBridge
    @Namespace(“Ext”)
    public class Panel { …}

    new Panel(){{}}; is rendered as is in the js file instead of new Ext.Panel.

    By the way, I must work on something else at the moment so I’ll come back when I can !

    I’ll try your hack for inheritance asap

    • axcraciun says:

      The generator will render {} when calling new on classes marked as @SyntheticType – i.e. types that do not exist in the bridged library, but are added by the bridge’s author for more clarity

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: