Hi I'm just after some advice/input.
I'm developing an application that has a MySQL backend, it has HTML pages that use jQuery to access PHP pages returning the data from MySQL in JSON.
Now, what I need to know is there a disadvantage to working like this.
The main advantage I can see that I can seperate the presentation layer and data access layer. Therefore it speeds up development once I have setup the objects in PHP.
One of the main disadvantages I can see (or I think I can see) is that Google won't be able to see the results inserted by jQuery Ajax/JSON.
Open to any advice, thanks in advance.
Regards, Andy
I strongly recommend that you enable your application to work for users without JavaScript support as well. If you do that you'll have a quick application for your visitors with JavaScript, you'll have a working application for visitors without and Google won't have any problems indexing it.
Related
I would like to develop a php based web application, preferably using MySQL and CodeIgniter PHP Framework. I've never used Weka before, but my assignment requires me to connect Weka to PHP.
The plan is to develop a dashboard (using php) which is going to be used by the school administrator. They won't have to interact with weka, since they are going to use the dashboard only.
When they enter the student data, php will send the data to weka and weka will perform data mining on the data. Once it finishes processing the data, the result will be returned back to php and displayed in the front end.
I have done a lot of Google to understand how to solve this problem, but most of the answers they provided are dead links or didn't offer much help.
Please help and thank you very much
I also have done my project analysis in weka front end used in asp.net. my opinion you just convert your datas to CSV file and attach to the weka analyse it.I hope it will be easier to you.
I'm relatively noob to the world of web developpement, and after learning the basics of HTML5/CSS3/JavaScript/jQuery I've started to learn AngularJS.
The problem is that as I am learning AngularJS, I don't understand what will be the point in learning a server-side language like PHP, it seems like AngularJS can do all the job (UI, views, routing, ...)
I think that the only reason would be to store data (but even that, I can use JSON files, no?)
and if it is, how much PHP do I need to learn? (or which parts of the language)
Thank you and sorry for my english.
Angular is a tool for a specific sort of job. It is not the tool for every job, and neither is PHP.
If you are writing an application that can live client-side, then you can certainly generate all of the dynamic components you need with Angular. There are many web applications out there that are entirely client-side. There are even more that function client-side and talk to a simple API server for their back-end.
If you are creating a web page that is not interactive, then there is little reason for something like Angular. There are benefits to having the DOM filled with content ahead of time. SEO is usually the biggest reason, but you might also consider clients that have disabled JavaScript (if you care about those).
Are you building something that is interactive? Consider a heavier client-side framework like Angular. Are you building a web page that is content-driven? Consider rendering your pages server-side. In the end, you will likely end up with a mix of both anyway.
A large consideration is security. Everything client side is exposed to the world. If the back end is just data storage without validation or protection except as written inside the client, a malicious user could push whatever data they wanted into your site. In addition if you are exposing code that is the core of a business inside the client, every user can see that as well.
What drawbacks are there in using "scraping" techniques and tools like http://simplehtmldom.sourceforge.net/ if you need to display content in a different template and domain like "m.mysite.com" for a mobile version of your site? I understand that the traditional way to do this is to hook into your database and write SQL queries to access what you need.
However, my SQL knowledge is lacking and the DB is quite complex using a custom CMS (I didn't build the site originally) . Everything that I need is on the front-end and I can access each piece with Simple DOM and place it in a jQuery Mobile template.
The only drawback that I can see is that if someone changes class or an id on the main site it could break the mobile site. But what are the other implications? Would a mobile site built like this be slow to load even if the main site it is based off of loads fast? Anything else I'm missing?
Also, isn't this basically how services like http://www.dudamobile.com/ work? They certainly don't have access to your DB.
Thanks for any help.
If I were you, I would develop a high level API and use it with templating engine. Once you do this, you have the API, which you can always use easily to obtain data from your database. Also, using templating engine gives you the ability to display the same information across different templates.
I'm a bit new to web development and wanted some insight on how to approach a project of mine.
We have a large mysql with a fairly large dataset that we want people to be able to play around with. Is there a way to have some sort of web based spreadsheet that, in addition to do normal spreadsheet calculations, query a database and pull down content? We have niche statical information on companies we research, ideally a user would come to the site and be able to access our data while adding their own logic(math operators) to make it more relevant to them.
We don't want to create an api to connect to their desktops(yet) and want to do this entirely over the web.
Any help on the approach or tools you'd use would be greatly appreciated.
Thanks in advance
Edit: I found a good tool for drupal "Sheetnode" which uses phpexcel....I'll study it, I'm not totally sure if it allows mysql queries to be added within cells.
Give YUI datatable a try. The YUI library is one of the best-documented libraries. Yes, you can do queries for every cell in the sheet. You can use one query to populate the whole spreadsheet, and then another query for updating each individual cell. You will be responsible for programming the server-side code in Drupal using your own custom module. The menu_hook in Drupal will allow you to accept RESTful calls from the datatable and JavaScript.
I found phpexcel ( phpexcel.codeplex.com/ ) does what I want and there's a module for drupal for me.
If you're familiar with Java, the most relevant choice would probably be https://vaadin.com/spreadsheet and using the open source framework Vaadin (Disclaimer: I'm working for the company behind the tool).
But anyhow, with this it's as easy as:
Spreadsheet s = new Spreadsheet(
new File("/path/to/some/xls/file/on/server.xlsx"));
layout.addComponent(s);
to add a excel file in your web browser.
I'm currently researching the best way to approach building a JavaScript widget someone can embed on their site, which would retrieve and display information from an external MySQL database.
The gist of the widget would mimic the needs/functionality of Twitter's widget (http://twitter.com/about/resources/widgets), where it uses some combination of JavaScript, PHP and/or AJAX and retrieves information from a MySQL database with secure (or at least somewhat safe) cross-browser access. Does anyone have thoughts or ideas on the best and most reliable way to approach something like this?
Here is a great guide to building a cross-domain widget: http://alexmarandon.com/articles/web_widget_jquery/
The hard part is the Javascript side; the server side can be written in PHP, or Python, or Ruby or whatever. Your google search should include the term "javascript widget" to get more articles like this one.
Should be simple. Encapsulate your widget entirely in a JS file if possible (minus images) and use AJAX for calling a REST or SOAP (probably want to stick to REST) webservice for any data access you need.
IFRAME, just use a iframe. you have
native sandbox
control over your environment
no updating your widget for your users if there is a new browser. You just update your code in your iframe.
Everyone uses this method ( Google+, Youtube, Facebook, Twitter )
its a win win situation.