1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    5
    Vote Rating
    0
    rolaaus is on a distinguished road

      0  

    Default Answered: I need help with some basics! data binding, or CRUD and basic app structure

    Answered: I need help with some basics! data binding, or CRUD and basic app structure


    I downloaded ExtJS4 about a week ago, and have been playing around with it for a little while, and yesterday ran across the Sencha Architect design studio, and just started playing around with that.

    My problem is, I can't find any simple and easy to understand (that last part being key) help or tutorial about linking my app to data. I don't have any particular favorite data store yet, I don't care if I use SQLLite or XML. What I would love to have - if possible is data this is available to my app user off-line, so that can continue to use the application when not connected, but will sync when they are connected. If that's not possible, than could someone please just point me to the best option to use with ExtJS as far as data goes.

    Also, I have looked at the MVC examples that came with the API, and while I understand the basic concept, I tried taking the existing example application and modifying it for my own needs, but haven't been able to get anywhere with it.

    I'm not really the type of programmer that maps out their application ahead of time, planning on how many forms I'll need, and which dataset I will need a detail form for and which one I'll need a record list for (as in, a list of employees on one form that opens up an employee detail form). But I would like to know how to use the MVC model in my application ... if that is the best practice, or if there is a more preferred practice, a URL reference to that would be greatly appreciated.

    I've been a database programmer for the past 15 years, and I am wanting to update my skills with JavaScript in order to have the option of creating web based database available to anyone that hires me, or contracts me for a special project. So, really I have the existing knowledge of designing databases, but I just don't know how to apply what I know to JS and ExtJS specifically, and the examples/demos that I have aren't that good at helping out newbies.

    Thanks in advanced, I appreciate the assistance/references.

  2. Here are the files

    Attachment 37025
    Attachment 37026

    Scott.

  3. #2
    Sencha User
    Join Date
    Jul 2012
    Posts
    5
    Vote Rating
    0
    rolaaus is on a distinguished road

      0  

    Default just an FYI

    just an FYI


    I have read through the documentation and understand that there are several components needed to link to data, such as Store, View, Proxy, and as I mentioned, I looked at the example(s) that tie them together, but have not been able to take an existing example and utilize my own data. And, I haven't found any generic documentation that shows how each of these components tie together in order to produce a form that displays data pulled from anything other than an static array.

  4. #3
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,872
    Answers
    652
    Vote Rating
    438
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Here are a few quick examples I posted that will help with the data aspect: (mysql/php)
    http://www.sencha.com/forum/showthread.php?229410

    I am not sure of your background for server side, but frameworks like CodeIgniter are good options for handling the backend.

    You will want to use JSON for transferring data between client/server.

    Here is a good article on MVC
    http://www.sencha.com/learn/the-mvc-...-architecture/

    Just realize that MVC is basically for organizing your code. There are a few nuances, but it will start to click.

    For data sync, you may want to look at Sencha.IO

    Regards,
    Scott

  5. #4
    Sencha User
    Join Date
    Jul 2012
    Posts
    5
    Vote Rating
    0
    rolaaus is on a distinguished road

      0  

    Default Thanks, but I can't access that thread

    Thanks, but I can't access that thread


    Scott,

    Thanks for posting, but the link to the thread you posted is to a premium forum and I can't view. I can see you have some zip'd files, but I couldn't even download those :-(

    Could you possible re-post those zip files to this thread, or is there some other alternative for me to see this info?

  6. #5
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,872
    Answers
    652
    Vote Rating
    438
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      1  

    Default


    Here are the files

    t6775-remote.zip
    f185069.zip

    Scott.

  7. #6
    Sencha User
    Join Date
    Jul 2012
    Posts
    5
    Vote Rating
    0
    rolaaus is on a distinguished road

      0  

    Default I got it to work, for the most part...

    I got it to work, for the most part...


    I managed to walk through the documentation/tutorial. I got everything to work (eventually), right up until the very last sync() portion. I was actually changing all the various names of the Stores, Proxy's etc. and figured out that I needed to change the object name that was calling the sync to reflect my new name. I also had problems because I've been working on my Windows7 laptop running IIS, but I eventually got the JSON/XML data to load. The problem with the sync() was an error in the JS console that came back from the POST with "405 (Method Not Allowed) "<br><br>I've tried doing some searching on Google for this error, but couldn't find anything specific for this situation (found some results for Dynamics and what-not)<br><br>Any ideas? I mean, other than switching to LAMP? I do have a portable version of Apache on a USB device, but prefer to at least attempt to fix things and keep the configuration the way things are before jumping ship and giving up on IIS.

  8. #7
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,872
    Answers
    652
    Vote Rating
    438
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    I am a Apache person myself ... I found this article:
    http://www.somacon.com/p126.php

    There may be a few other options to try if this does not work.

    Scott.

  9. #8
    Sencha User
    Join Date
    Jul 2012
    Posts
    5
    Vote Rating
    0
    rolaaus is on a distinguished road

      0  

    Default


    I just wanted to thank you for posting, especially going out of your way and uploading the files from the paid support post you previously referenced.

    As I mentioned in my previous post, I did get some of the data functionality working, though I eventually ran into some roadblocks with saving/updating changes to existing records ... which meant I was going to have problems with adding records as well - since I am trying to figure out things in stages, I hadn't even gotten to that yet.

    FYI, I did get the error resolved regarding the 405 resource not allowed, but my sample stuff still wasn't changing, and it may have been (most likely) because the data was (I believe it's called) "in-line". Instead of being an XML file or an external database, the data itself was in the JS file(s).

    Anyways, taking a look at the examples you gave me (and actually taking the steps needed to look at them) helped me out tremendously.

    I know that I will most likely end up using MySQL for my underlying data, I was trying to play around with XML, and with the idea of using local storage and syncing with an on-line database. I'm going to look into some other resources for this scenario, but without this information, I wouldn't have been able to proceed.

    Not only did you show me what I was needing in order to proceed, but the example files give me an idea of where the off-line sync is headed. Basically, you've helped me, though indirectly, with the next step as well.

    Oh yeah, and one last thing, I managed to take the MVC application example and "make it my own", which is what I was doing when I walked through the Documentation's example. There was a lot of problems with typo's in name changing and with code format (semi-colon's, bracket's, etc.) but I eventually got it all worked out - except for the data changes, as I mentioned. But now I'll have to covered as well. I should have no problems taking these examples you uploaded and making them my own as well.

  10. #9
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,872
    Answers
    652
    Vote Rating
    438
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    No problem. Glad I was able to help.

    Scott.

  11. #10
    Sencha User
    Join Date
    Jul 2012
    Posts
    1
    Vote Rating
    0
    habib.maa22 is on a distinguished road

      0  

    Default


    same to you..................