Announcement

Collapse
No announcement yet.
This is a sticky topic.
X
X
  • Filter
  • Time
Clear All
new posts

    Announcing SmartClient Server for Node.js: free and open source!

    Node.js is a popular server platform that allows coding in JavaScript.
    By using Node.js in combination with SmartClient, you can use the same language for both client and server-side programming.

    Our new SmartClient Server for Node.js provides many of the features of the SQLDataSource from our Java server, including all CRUD operations, sorting and filtering.
    Server-side DataSources are expressed in a XML (.ds.xml) or JSON (.ds.js) format analogous to the format used by our Java server.

    We've also got support for the NPM package manager.
    smartclient-node is a package you can use to run your SmartClient server in minutes.

    Installation

    1. Install Node.js
    2. Create new directory
    Code:
    mkdir my-server && cd my-server
    3. Initialize your project (create package.json file)
    Code:
    npm init
    4. Add smartclient-node dependency to your project
    Code:
    npm install -S smartclient-node
    Installation process will ask following questions:
    Code:
    Destination directory [/home/user/my-server/]:
    Download SmartClient evaluation runtime (WARN: overwrites existing web/isomorphic directory)? [yes]:
    Install sample (WARN: overwrites existing index.html file)? [yes]:
    Accept defaults. You can always repeat installation by running
    Code:
    ./node_modules/.bin/smartclient-install
    5. Start your server
    Code:
    ./node_modules/.bin/smartclient-server
    6. Go to your browser and access localhost:8080

    Configuration

    Installation process creates configuration file conf/config.properties. Update this file with your values.
    Server should be restarted for changes to take effect.

    Current status
    • Supports RPC calls without method arguments
      • Queued operations (more than one operation in a single HTTP request)
    • Supports SQL data sources for MySQL and PostgreSQL
      • CRUD operations
      • Queued operations (more than one DataSource operation in a single HTTP request)
      • Paging
      • Sorting
      • Simple filtering
      • Filtering with Advanced criteria
    • Supports JSON data source: data is stored in file in JSON format
      • CRUD operations
      • only supports client-side filtering and sorting
    • Supports REST calls

    Try it now and tell us how did it go! Your feedback is highly welcome! Post your thoughts, suggestions, questions and requests right here in this thread.

    Open-source

    smartclient-node is released under LGPL-3.0 license.
    Source code can be found on GitHub:
    https://github.com/isomorphic-software/smartclient-node
    https://github.com/isomorphic-software/smartclient-rpc

    If you see how to improve it - do it. Fork it. Create pull request. Post code snippet.
    Your contributions make this project better for everyone.

    Support

    This project is not currently covered by standard support agreements, but we offer very affordable consulting and support services by arrangement - use Contact Us page to get started.


    #2
    We recently purchased a license for the Power Edition of SmartClient. We are not using the SmartClient Server. We are only using the client-side components. I am trying to integrate this into my node + webpack project and am having difficulties. I'm extremely new to node and webpack, so I am still learning. Is there any direction on how to use the client components via webpack?

    Comment


      #3
      The ISC runtime files are already stripped and minified, and we would not suggest combining them into fewer files, as this would worsen your ability to cache part of the runtime while the user is logging in or interacting with non-SmartClient landing pages - see the QuickStart Guide, Authentication.

      Comment


        #4
        Thanks for the quick reply! That is helpful information. However, my troubles really lied in trying to include the JS files in a node project and being able to use the API. I did find a smartclient-power package on the npm registry (https://www.npmjs.com/package/smartclient-power), which is mainly what I was looking for. Is there any documentation on that package? I would think you could do something like:

        import {Button, Canvas} from "smartclient-power";

        but that doesn't seem to be how it works.

        Comment


          #5
          Please ignore that npm package, it's experimental.

          All you need to do is include <script> tags in your .html start file - that's it. No further declarations. This is covered in our QuickStart Guide and there are sample starter .html files in the SmartClient SDK.

          Comment


            #6
            Note, the NPM packages can actually be used if you are on 12.0 or later - docs are here. However, obviously you will still need to add script tags as indicated above, and you should still be sure to read the QuickStart Guide and make use of the SmartClient Reference.

            Comment


              #7
              Hi, Isomorphic.
              We already use SmartClient and SmartGWT in our applications, client and server side.

              Since last year, we are migrating many small applications from Apache Tomcat to node.js. More specifically Google Firebase node.js.
              This project could be a good starting point, but I could not make it work. It's seen to be dead, last commit was 4 years ago.
              The question is do anybody has a solution to use SmartClient server side functions in node.js ?

              A proxy between client <-> node.js <-> tomcat is a possible solution. But it would generate more maintenance for the backend team, the idea is to terminate the tomcat.

              Comment


                #8
                If you are having trouble with our Node.js server support, please start a new thread about that, explaining what went wrong.

                Comment

                Working...
                X