Giter Club home page Giter Club logo

extdirect.examples's People

Contributors

jgrocha avatar pkellner avatar srguiwiz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

extdirect.examples's Issues

Share option "classPath" on "classPath" and "classUrl"

Please share option "classPath" on "classPath" and "classUrl", does not always correspond to the physical location of the folder path RL. For example I have it so: "classUrl": "/ direct",
"classPath": "/ app / direct"

example defects

Using Architect example. Watching in mongo with

use extdirectnode
db.tasks.find()

Every time bringing up Add Task button adds an extraneous task (as you can see in Mongo). Further all those tasks have a Mongo generated _id ObjectId as well as an id of 0. Which one could be willing to overlook if it weren't the issue that on load of the gridpanel one sees only a single (the most recent?) of those tasks, as if all of them having id 0 prevents the additional tasks from showing,

uuid vs AUTO_INCREMENT

Hello Juris,

Sorry if this is not the right place to put this, but i could not find another spot.

Thank you for the examples. I got it up and running yesterday, but I have a question / suggestion.

Wouldn't it be better to use uuid's instead of auto increment for the id?

For the MySql example i changed the code in DXToDoItem.js so it creates a uuid using the node-uuid lib and use this uuid (params['id']) for the second query.
Next to that, change MySql column structure to match uuid (e.g. char(36)). Clientside id becomes string instead of int. Works perfect for me.

var table = 'todoitem';
var db = global.App.database;
var uuid = require('node-uuid');

var DXTodoItem  = {
    create: function(params, callback){
        var conn = db.connect();
        //delete params['id'];
        params['id'] = uuid.v4();

        conn.query('INSERT INTO ' + table + ' SET ?', params, function(err, result) {

            if (err) throw err;

            conn.query('SELECT * FROM '  + table + ' WHERE id = ?', params['id'], function(err, rows, fields) {
                db.disconnect(conn); //release connection
                callback({
                    success: true,
                    data: rows[0]
                });
            });


        });
    },

Thanks again!

does read support filtering ?

I think there isn't a WHERE in the MySQL implementation, which means it cannot support filtering. Did I think correctly?

I'd like to implement complete CRUD support for MongoDB, and I am looking at your MySQL as an example.

Is that the last item missing for complete CRUD according to Ext.Direct?

As side thought: Would that same code that does filtering also take care of read finding by id, if that is in use anywhere in Ext JS? I don't know whether that is a feature of read use by Ext JS and Ext.Direct, I am just thinking it would be the same kind of WHERE.

Same as last time, if you lead for MySQL, I will follow for MongoDB. This time I should be faster because this is a smaller step and we are actually using it.

please rename to extdirect-examples

Because if I (anyone) clone(s) it or fork(s) it and the resulting directory or repo lives at top level with other repos it is too generic "code-examples".

Build instructions unclear

Hi! I'm brand new to sencha/extjs and have difficulties following the instructions...

I've done the following (on win 8.1):

  • Installed Sencha Cmd v5.1, it's in my path
  • Downloaded extjs 4.2
  • Ran sencha generate app DemoExtJs ..\DemoExtJs within the ext-4.2.1.883 folder
  • Cloned this repo
  • Replaced the ext folder in extdirect.examples\client\DemoExtJs with the generated one

Running sencha app refresh in extdirect.examples\client\DemoExtJs results in:

Sencha Cmd v5.1.1.39
[INF] Processing Build Descriptor : default
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExNotFound: Required property file [path]\extdirect.examples\client\DemoExtJs\.sencha\app\development.defaults.properties does not exist
[ERR]
[ERR] Total time: 0 seconds
[ERR] The following error occurred while executing this line: [path]\bin\Sencha\Cmd\5.1.1.39\plugins\ext\4.2\plugin.xml:394:
The following error occurred while executing this  line: [path]\extdirect.examples\client\DemoExtJs\.sencha\app\init-impl.xml:62:
com.sencha.exceptions.ExNotFound: Required property file [path]\extdirect.examples\client\DemoExtJs\.sencha\app\development.defaults.properties does not exist

Should I use another combo of framework and sencha cmd?
Or have I simply misread the instructions? (they are a bit vague for someone not familiar with extjs)
Thanks

in Architect example Tasks store autoLoad causes problems

You probably know this kind of situation, so I'll keep it short: Apparently at time of autoLoad the DirectAPI isn't available yet, so it fails (nasty stuff in console log saying can't do that API), and the spinning Loading indicator prevents anything from being done in UI. After I switched off (got rid of) autoLoad for Tasks store there was no more nasties in console log, no more spinning Loading indicator, and I was able to click Add Task and add a task, which I then saw in MongoDB. Obviously though didn't load existing data on startup, but you probably know where you want to trigger that (what event).

suggestion for inheritance please

I am recognizing that in directory direct multiple classes like DXTodoItem.js could inherit a lot of common code from a generic class. I see the need clearly for an example with MongoDB I am working on.

Do you, does anyone, have a suggestion, from experience, with Node.js, in this context, which kind of inheritance to use?

opening in Sencha Architect 3

We seem not to find an easy way to open this as a project in Sencha Architect 3 so far.

Any advice or additional file needed?

Got this working with Sencha Cmd. But now a colleague asks questions so I thought "let's open this with Sencha Architect 3" so we can "see" how the Store is configured, so she can do the same (using Ext.Direct for store) in her from scratch project in Sencha Architect 3.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.