MySql on the cloud : DIY or DbaaS ?

Being an Open Source database, MySql is one of the most popular database systems used off-late. Combined with PHP, it forms a very formidable combination for Web based systems. Since everything is going the Cloud way these days, I will just compare 2 different ways in which MySql can be made available on a Cloud.

 

The first method is the Do-It-Yourself (DIY) way, in which you can setup your own version of mysql database over a cloud server, and use it for your applications.

 

The second method is to use a Mysql system which is available as a Service.(Database as a Service – DbaaS).

 

DbaaS:
- Rule based Auto Scale up/down
- No downtime during scaling
- Pay per actual usage
- Highly available, self-healing database which never fails
- Zero code changes to application.
- Connection string is very similar to normal method of connection.

 

DIY:
– Very simple to use for small applications
– Cheaper that DbaaS implementation as the Mysql is free and you only pay for the cloud instance
– Highly complex to scale when usage increases
– Risk of downtimes when usage is high.

Using the DbaaS spares you a lot of time on constant monitoring of the DB during high usage hours. But it is not cheap. If reliability and secure service is your objective , DbaaS is the way to go.

Preventing copy-paste into textfields

You can prevent the copy-paste functionality into textfields of your web-forms using a very simple jquery method.
First include the jquery file in between  the <head> tag.

<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>

Then add the following code to the <head> tag, below the include script.

<script type="text/javascript">// <![CDATA[
 $(document).ready(function () {
 $('input[type=text]').bind('copy paste', function (e) {
 e.preventDefault();
 });
 });
 // ]]>
 </script>

The above code will prevent copy and paste to and from any textfields of your form.

You can also use the id of the form fields to refer and block the copy-paste. This can be acheived by replacing the part $('input[type=text]') with $('#id_of_textbox') , in the above function.

dhtmlxSuite 2008 Rel.2, Build Dynamic Data-Driven Grids from XML, CSV or JSON

DHTMLX announced the latest update of its dhtmlxSuite, a professional Ajax components toolkit for web UI. The major updates concern Grid and Treegrid components and include a large number of new features and improvements, including the ability to load data from JSON and JS-array, smart rendering and paging support for hierarchical data grids. Also a new component, dhtmlxSlider, is introduced.
Read More…

PHP File Upload Errors Explained

From version 4.2.0, PHP has got a new set of error codes that handles and reports all errors occuring during file upload, in the filearray object. The error is found in $_FILES['userfile']['error'].These error codes  and their explanations are given in this article.

Read More…

Building and calling webservices using SOAP

Web services allow you to share data across many platforms and hardware configurations. You create a webservice in PHP, pass the webservice URl to an asp.net program, and it easily calls the webservice methods to get the data from your server. PHP has various methods to create and use webservices. XML-RPC, SOAP and REST are a few. In this article we will find out how we can create and use a webservice using SOAP. Basic database programming knowledge using PHP is assumed.

Read More…

Force download files using PHP

At times we might want to give files for users to download. Also you wouldn't want to have the file storage location in a public access folder. To achieve these, you can store the file in an internal folder which is not accesible to public via a URL, and force the file to be downloaded using php header.
Read More…

1 2 3 7  Scroll to top