I'm a newbie to AngularJS, and I've created an web application by using it.
I would like to know whether it is possible to create a Web application in AngularJS with database connectivity and without using any framework (like Ruby on Rails or PHP or any other)?
You can use AngularJS to do as little or as much as you would like on your web application. However AngularJS is a client side scripting language, if you need to communicate with a database you will need a server side language in order to do this. You ask if you are able to do this without "frameworks" and the answer if yes, but you cannot do it without a physical language like Ruby or PHP.
If you are looking for a lightweight framework to do simple REST requests for your AngularJS application I would highly recommend a ruby framework called Sinatra it takes minutes to set up, if you would want to connect to a database like MySQL or PostgreSQL then I would also suggest using DataMapper as your ORM. Alternatively you can create your own PHP script to avoid the use of a framework.
Related
The question is very basic, but it's very important for me. Please suggest me a solution. I have some mobile app template in HTML/ jQuery. I want to create Android app using the template. What will be the best choice for the back-end language. Database is MySQL. I have 10 years of experience in PHP. But I found PHP is used mainly for web, it is not suitable for Android app. So, please suggest what language should I learn and which IDE should I use. And finally is there anyway I can use PHP for developing Android App?
Node.js might be an alternative for the back-end, because it's still included with javascript and supports mysql
For both hybrid and native apps, you will probably need to develop an online API the app can use as a backend. That API will not run on the mobile device but on a webserver somewhere and can most definitely be built using PHP/MySQL.
For the app itself, if you want to be able to use your HTML/jQuery template, you're pretty much limited to a web app or hybrid app. These render your UI in a browser context so they're capable of loading and runnig jQuery code. You will probably have to learn about service workers to handle on-device caching so that your app stays functional when the device is offline.
For a native app, your best bet IMHO is to go with React Native. You cannot use your current HTML/jQuery template for that, since native components do not use HTML or Javascript (or CSS for that matter). But, in React Native you can rewrite the HTML part to use JSX components which are pretty similar. All the jQuery logic would have to be re-engineered "the React way" but will still be Javascript. The React Native compiler will take care of converting that JSX/CSS/Javascript code to native Android components.
It depends on you but i will suggest you if you want to expend your skills in applications development try to learn ReactNative
I have a question about web and native app development and integrating multiple frameworks.
I currently have a web app (html 5, css, js/jquery, php, mysql) and want to make available as a native app on Android and iOS. It uses Yii framework and I was thinking about using Netbeans IDE and Apache Cordova to make the conversion. How do I go about this? Can someone supply some links or an explanation to clear things up for me?
If you have a different method you'd like to recommend instead of Cordova, I'd appreciate that too. Please provide why you prefer that method though.
I've seen plenty of information on this forum and the web that explains this process, but non with Yii in mind.
Thank you for all and any help!
I had the same issue. since we have decided to drop the native app and use an html5 website design i picked, Yii+backbone.js .
in your case, if you plan on building a native app, the backend ( PHP or Yii in your case ) will not be used as a smart web server , because you will use a JS framework.
Known and well loved and used frameworks are:
angular.js
backbone.js
knockout.js
ember.js
Keep in mind, php is a server side language. Its not client based. Yii could serve as a backend providing the data thats all. When you want to use cordova you need a client side framework like jquery mobile.
I just want to ask, does it make sense to use both a PHP backend MVC structure, mixed with a front end js MVC structure?
My question arises from building a web application in CodeIgniter, I've begun working with websockets and nodejs so a lot of my interactions to the front end don't even touch php. Currently though the only way to change content in my database is to go through CI via ajax calls.
Is there any advice and how to create and maintain both MVC structures? or should this be avoided.
As you already said: CodeIgniter is a MVC framework. As you're using BackboneJS you won't need the VIEW-part of CI and the MODEL-part won't be needed that much.
You could use CodeIgniter as a simple API backend that handles as a middleman between your frontend and the database (there are very good xmlrpc libraries for CI out there!) or you could go for a REST-specific framework like Recess (http://www.recessframework.org/), try this: https://stackoverflow.com/questions/238125/best-framework-for-php-and-creation-of-restful-based-web-services
Short answer: your php-backend would just serve as a API-provider which is used by BackboneJS, so you could use any framework as long as it fits your needs - and CodeIgniter seems to do that.
Tip: you can just delete the libraries and helpers from CodeIgniter that you won't need for you API.
I'm thinking in create a webapplication with cakephp but consuming python's appengine webservice. But, to install cakephp etc, I need to configure the database. Appengine uses another kind of datastorage, with is different from mysql, etc.
I was thinking in store the data in appengine, and using the python webservices, and with the cakephp application comunicating with the webservice, for insert and retrieve data.
Is there any good resource for this, or is it unpossible.
Obs: also opened for a possibility for developing the webapplicaiton completely in python running in appengine. If anyone has a good resource.
Thanks.
I think that you should try different solution: http://aws.amazon.com/simpledb/
It appears that CakePHP is a MVC framework that's very similar to django, which is included in app engine for python. I'm not sure why you would want to store your data in google app engine, unless you're dealing with an extremely large amount of data, in which case you're likely comfortable enough working in python to just make the app work entirely on GAE.
See the official docs for more info:
http://code.google.com/appengine/docs/python/overview.html
http://code.google.com/appengine/articles/django.html
What you can do is run your CakePHP app on a standard LAMP web host and access the GAE Data Store through a REST or RPC web service. This isn't such a bad idea if you already have a CakePHP front-end that deals with RPCs in the backend, but if your Cake app stores all it's Models in MySQL it could take considerable effort to adapt it.CakePHP Models abstract their storage method using the DataSource class. You might be able to find a DataSource class that uses REST or RPC. However, if you don't have a very considerable investment in CakePHP Controllers and Templates I would suggest simply building your app entirely in GAE
You can not run PHP on GAE. If you run PHP somewhere, it is a bad architecture to go over the internet for your data. It will be slooooow and a nightmare to develop in.
You should store your data where you run your php, unless you must have a distributed, globally scaling architecture, which afaiu not the case.
There's a detailed tutorial on getting CakePHP up using the PHP runtime that Google recently announced. http://aymanrb.blogspot.com/2013/05/cakephp-deployment-on-google-app-engine.html
We have a game project designed on ASP&SQL Server, and we need to integrate it's user database with Drupal.
This would be easier from Project to Drupal (since there is user_save and user_delete functions available globally by using drupal bootstrap) but I'm not sure if we can execute PHP functions on an ASP platform.
Is there any documentation for this kind of problems? What do you suggest?
First of all, I think you should rethink your strategy. Why did you choose ASP & MSSQL and why did you choose Drupal?
But if you really want to stick with it I guess by far the easiest way would be to write a PHP (SOAP) webservice that can be used to interact with Drupal (ie. add/delete users) using the Drupal API, and call this from your ASP code.
****edit****
You could use the SOAP Server and Services modules of Drupal. Or just write a plain and simple webservice from scratch using the PHP soap classes.
If you're just looking to use the games user database for authentication I know Drupal has a few modules that allow for authentication via external services. I believe basic or digest HTTP is pretty straightforward but it probably wouldn't be too difficult to write a services layer on the ASP app. Check out Drupal's "user access/authentication" section for ideas on external authentication.
you can build your own drupal module and build an api that exposes everything you want to do, im pretty sure asp.net has a lib or something should be out there to build a simple xml-rpc, rest client, avoid soap, you will add an extra layer that you dont really need