-
Notifications
You must be signed in to change notification settings - Fork 29
readme for ch7 is missing #2
Comments
Can you please explain? As in "how do i get a server started?" |
Yes On Mon, Apr 14, 2014 at 2:46 PM, Modus Create [email protected]:
|
"If you wish to explore the effect of executing the CRUD actions, we On Mon, Apr 14, 2014 at 2:47 PM, powerblue111 [email protected]:
|
Many thanks for that. |
Will it be available very soon, when? |
thanks for noticing @powerblue . I wonder where that file went ? :) Oh well - I put some new notes here: https://github.com/jacobandresen/extjs-in-action-examples/blob/c1dac42fb4d3f85abad3cdd38a6ebfa2d5e8a0e7/examples/ch07/README.txt . Let me know if these work for you ? I am out travelling right now - I'll write some more notes when I get back tomorrow. |
Could you add more to the README.txt, such as the purpose of the files?: department.php Thanks On Tue, Apr 15, 2014 at 5:14 PM, Jacob Andresen [email protected]:
|
Also getting an error after running the sql on a mysql db, and having all the files in the proper folder on the server: Warning: mysql_connect(): Headers and client library minor version mismatch. Headers:50531 Library:50168 in …../public_html/ext4/crud.php on line 2 Warning: Cannot modify header information - headers already sent by (output started at /home/ecigocea/public_html/ext4/crud.php:2) in /…..public_html/ext4/crud.phpon line 144 |
Hi @powerblue - looks like you could have a problem with your php install on your machine? which version of linux are you running? I left some notes for ubuntu linux in the README.txt file the department.php and employee.php files are small files to simulate usage of the ActiveRecord pattern together wirh crud.php . In a realworld application you would use something like Symfony2 or Laravel for that ( or your favourite library - in you favourite severside language). Remember to switch the proxy to "ajax" from "jsonp" when you are running locally. Let me know how it goes :) |
Hi - Running php 5.4.24 on centos - Thanks On Wed, Apr 16, 2014 at 2:30 AM, Jacob Andresen [email protected]:
|
Also, what commands can be run in the javascript console to inspect the data store after it is read from the mysql db? Thanks |
I am not that familiar with centos. I noticed that the package tool on centos is called "yum" . Maybe you can use this tool to update php , apache and mysql packages? If you enter the following: employeeStore.first(); in your console , then you should have first result available on the store displayed on the console. I left some examples in chapter 7.3 for ways you can interact with the datastore. |
I have updated to these, and still getting the same error: Apache version 2.2.27 Thanks |
could you try installing the php5-mysqlnd package instead of the php5-mysql package and see if this fixes the problem on centos? |
Nevermind :) I got curious and installed a centos system here locally. you can install the required packages like this on centos: yum install httpd mysql-server php I updated the README.txt with instructions for centos here: https://github.com/jacobandresen/extjs-in-action-examples/blob/patch-1/examples/ch07/README.txt The packages that I have working on CentOS release 6.5 here are: httpd-2.2.15-30.el6.centos.x86_64 |
Actually, I already have all that installed, is there a trouble in the Thanks On Thu, Apr 17, 2014 at 7:43 AM, Jacob Andresen [email protected]:
|
Hey, I'm actually more interested in extDirect, if I use extDirect with the Thanks On Thu, Apr 17, 2014 at 9:50 AM, powerblue111 [email protected]:
|
I doubt that the php and mysql related errors you are experiencing on centos are related to ExtJS . Remember that the Ext JS package is a clientside package :) Feel free to experiment with ExtDirect and Symfony - that is allways a good idea. Are you able to run other php and mysql applications on your machine? |
Mysql and php seem to work otherwise, though I am working on getting mysql Thanks On Thu, Apr 17, 2014 at 1:55 PM, Jacob Andresen [email protected]:
|
Is there a symfony2 stack for extjs 4, the one currently available seems to be for extjs 3?: http://www.symfony-project.org/plugins/dsExtDirectPlugin Or will this one actually work for extjs4 ? Thanks |
When running loading The_Employee_Store.html after adding the sql to the server and having crud.php also on the server, I am getting a new error(mysql headers error is solved): "Uncaught SyntaxError: Unexpected token ILLEGAL " Thanks |
Good to hear that you got your mysql things resolved :) Remember to switch the proxy to 'ajax' instead of 'jsonp'. This should let you retrieve json from the backend . When you are using 'jsonp' as a backend you will see something like this in the result: Ext.data.JsonP.callback1({"data":[{"id":"467","firstName .... this can be sent from the server and evaluated on the client .. but it contains illegal tokens in json. By switching the proxy to "ajax" the result will look something like this: {"data":[{"id":"467","firstName .... I included a note to remember to switch the proxy type in https://github.com/jacobandresen/extjs-in-action-examples/blob/patch-1/examples/ch07/README.txt With regards to Ext JS direct and symfony then I think the protocol is still the same, so the Symfony plugin should still be useful. @grgur knows more than me about Direct. @grgur do you expect that @powerblue can use the Symfony Direct plugin with Ext JS 4? @powerblue : let me know if the instructions in the README.txt file are sufficient for you on centos. I expect that you will be able to inspect the datastore content if you change the proxy type. |
I changed the code to the following, and am trying to inspect the data store but am getting an undefined error when running employeeStore.first(); employeeStore.first(); undefined
|
Looks like you are missing a declaration of the "Employee" store as declared in listing 7.5 "The Employee model with validations". I noticed an error in the example listing where listing 7.4 and listing 7.5 had been mixed up. I fixed this in https://github.com/jacobandresen/extjs-in-action-examples/blob/patch-1/examples/ch07/7.4_The_Employee_Store.html and updated https://github.com/jacobandresen/extjs-in-action-examples/blob/patch-1/examples/ch07/README.txt . Thanks for hanging in there @powerblue.:) remember that if you tweak the code in e.g 7.4_The_Employee_Store.html then crud.php will be right next to it .. so your code be something like https://gist.github.com/jacobandresen/02d7351a17e284a0d9aa Remember that if your urlRoot endpoint is on another domain , then you will need jsonp. |
Ok, there don't seem to be any errors in the javascript console now, with the following existing on the server, when proxy is set to ajax. Is there a list of javascript commands available that can be used to inspect the store in addition to employeeStore.first(); ? Also, does crud.php call the employee.php and department.php and use them to manipulate the database? 7.4_The_Employee_Store.html:
And also: 7.5_The_Employee_model_with_validations.js:
And also: crud.php
Thanks |
Great to hear that you have no errors now :) You could also try "last" and "count". You retrieve single items using "getAt" You can find a list of method calls on the store here: http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.data.Store I also noticed that sencha released "App Inspector for Sencha" for google chrome . Look for it on the chrome webshop. It also let's you inspect the datastore visually. Great tool :) When you are ready to proceed you can continue to chapter 8 in the book. It uses the same datastores . In Chapter 8 you will also have something to look at on the screen :) |
"App Inspector for Sencha" for google chrome doesnt appear to work at all, though: employeeStore.last(); and employeeStore.count(); seem to work. |
Good to hear that "last" and "count" are working for you. Sorry to hear that "App Inspector for Sencha" is not working for you. Feel free to report issues about App Inspector here: https://github.com/senchalabs/AppInspector/ . |
No description provided.
The text was updated successfully, but these errors were encountered: