0

How to Make an Customize app

Hello Mojit,

i m new to mojito.. i have just implement some of the basic sample applications of mojito given in examples..
now i would like to make an customize application with the use of PHP..  

like i want to get DATA from PHP file dynamically. i know that we can make a call to model from controller's one the action

can you please give a suggestion how can i implement such application??
what is the necessarily changes i have to do with controller.server.js and model.server.js and where do i keep my php file??

Thanks,
Ashish

by
7 Replies
  • You can not execute PHP code in Mojito applications. However, you could use your PHP code to provide an API/web service. Then in your Mojito controller or model you can call this API using YUI's IO capabilities:
    http://yuilibrary.com/yui/docs/io/
    0
  • Hello Frank,

    i m really glad to receive such a gr8 help from you... yesterday i just came to know that we cant use PHP code in mojito app..
    also wanted to ask you one thing that can is there any way in mojito to connect with mysql DB and get DATA from database without using PHP code in my app..... 

    thanks again..
    0
  • http://stackoverflow.com/questions/3878818/node-js-and-mysql-drivers

    You can use any of those in your model implementation to talk to your DB.
    0
  • hello caridy,

    thanks for your help...
    i m using  db-mysql  http://nodejsdb.org/db-mysql/  for mysql connection....

    thanks,
    ashish
    0
  • I saw the video demonstration of mojito, the developer demos an app that can adopt to server/client/mobile environment and I am kind of lost with how the client/mobile adoption will work if you have a model that directly connects to a server database?
    0
  • Your files have an affinity, for example controller.server.js has the affinity "server". This means that this file can and will only execute on the server. Now if you have a MySQL DB that can only be accessed from your server, you can only do so in files with a server affinity. If you want files with a common affinity, means that they can run anywhere, then you have to find another way, probably an HTTP key-value store that can be accessed "from the internet", that could be used to store your data.
    0

Recent Posts

in Yahoo! Mojito