1. #11
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,358
    Vote Rating
    127
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Quote Originally Posted by magg View Post
    Dame, this was quick : http://stackoverflow.com/questions/2...data-on-a-disk
    This is the reason but really not the solution.
    Hrm... Ext JS and Sencha Touch are built to be server-side agnostic. You can integrate with any server-side technology that you would like PHP, ASP.Net, node.js, ColdFusion, etc. If you setup a writer for your Cars store it will send the delta of what has changed to your server side each time a sync of the store is requested.

    Setting the autoSync configuration on the Store to true will auto synchronize the data when changes are made on the client-side store.

    What server-side technology are you most familiar with? There are a couple few Java, PHP, node.js tutorials out there that show integration.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  2. #12
    Sencha User
    Join Date
    Oct 2011
    Location
    Germany
    Posts
    10
    Vote Rating
    0
    espi is on a distinguished road

      0  

    Default


    I use php. I hope, that I understood this(->link to a diagramm) right.

    There is an downloadable example from Sencha, but for me it is not that easy to understand,
    because I have to re-engineer the php-Scripts to see how sencha extjs works:
    http://try.sencha.com/extjs/4.0.7/examples/writer/

    So, it is NOT possible to connect to a database or write data to a file DIRECTLY from extjs,
    and there are no frameworks from SENCHA (php, asp, whatever) offering this like in CodeCharge.
    In Codecharge, they have a connector to backend-storage which makes it pretty easy to develop.

    I'm a beginner with SENCHA and having no connector to a Backend-Storage makes the start hard,
    but not impossible. Probably this way is more flexible.

    So my wich would be a php framework from sencha to connect (at the backend) to a database, a conifg file where I setup the database/IP/Port/Databasename/Loginnamne/Password like in ADOdb
    I would even pay for that.

    Or are there problems that I don't see?
    Last edited by espi; 3 Feb 2013 at 1:56 PM. Reason: the diagramm at the beginning of my text was away, now I made a link to it

  3. #13
    Sencha User
    Join Date
    Oct 2011
    Location
    Germany
    Posts
    10
    Vote Rating
    0
    espi is on a distinguished road

      0  

    Default Please: An simple easy example as described in ths post

    Please: An simple easy example as described in ths post


    Still the Problem: saving/updating data (from a store) to disk as a json file or whatever…
    What I found out:
    • I can not write data to disk with extJS directly
      sure I knew that this is not possible with JavaScript
    • I need a server side programming like php who makes that possible
    • extJS supports that and how I found out with the property API of a store
    • with this property I can control wich Javascript-methode which will be called when I do something with the data in a store (CRUD/Create,Read,Update,Delete)
    • also there has to be a php-file generating the JavaScript with the methods for the API-property
      those Methods will do the work, transfering data to php-files and the php-programming will do the rest.
    My problem is now, that I can't find any examples which are simple and which I can understand.
    So I found that:
    1. Product Informations about ExtDirect. That was the very best I found, I did not understand everything but got the concept.
    2. Ext.data.proxy.Direct, in the Ext JS manual, describing only pieces, probably will be good for me later.
    3. How to map an Ext 4 Grid to a MySQL table using Ext Direct and PHP (Part 2: CRUD)
      that should it be, that should answer all my questions, but that was to complicate for me and I did not get it to run.
    4. Extremely Easy Ext.Direct integration with PHP
      Again something very interesting, but again, I did not get it to run
    Sure, probably I'm kind of stupid or unexperienced but I do know php, JavaScript and mySQL well enougth and allready did a lot of projects with it.

    What will help me? A SIMPLE example. I'm dreaming from the following example:
    1. a model with two fields id and cityname bound to an empty store
    2. a panel with a button for adding a recordset to the store (when pressing it)
    3. on the serverside a php file takeing the added recordset and saving it to a file
    That's it. That would help me understanding the whole thing a lot. Sure, examples for the other CRUD operation would be also good, but each one in a single example, not to much in one.
    I'm sure, that I will read and understand the existing descriptions (links above) after I understood everything. And I'm sure that I will then ask myself how stupid I was not understanding this.

    Probably an easy example would also helping other developers.

    Thanks a lot,
    Frederic Espitalier