Showing posts with label Article. Show all posts
Showing posts with label Article. Show all posts
Friday, 24 August 2012
The Smoothest Application Development Ride – with Ruby on Rails
Ruby on Rails has been
the topic of discussion for years together, yet the capabilities of this
cutting-edge technology are not known to many an application developer, in
their entirety. What RoR application development provides is an enhanced and
supremely productive path to the rapid development of web application. Here, we
try to light the way to make this technology accessible and enjoyable to
developer communities across the globe. So, the next time you hire RoR developers, you can be assured that your application will be up and running in
no time at all.
Let’s start off with the
basics! Ruby is an ideal example of a purist’s concept of a pure object-oriented
language with an easy-to-write and maintain syntax that should be any
programmer’s dream come-true. And Rails? A framework that is open source and is
perfectly suited to the development of web-based, database-driven applications;
that’s Rails for you. The advantage of this framework is its capability to
develop applications up to 10x faster than technologies, such as Java! Ruby and
Rails leverage each other and the two most important principles of lesser lines
of code and convention over configuration are derived from this amalgamation.
As you start developing RoR web applications, you’ll realize that the mount of
code required is way lesser than other technologies. On the other hand, we have
convention over configuration which cuts the umbilical cord for all XML files.
You can literally do away with all XML configuration files, as simple
programming conventions take their place.
Okay, now onto the main
course! We will try and explain the process of developing
a web-based, database-driven application using Ruby on Rails.
The
Installation
Though Rails has always
been a breeze when it came to installation and configuration, there are many
tools available today that make this job even simpler. Based on your operating
environment, you can choose any one of the following options: Instant Rails for
Windows, Locomotive for Mac OS X, and Rails LiveCD for Linux.
The Purpose
The application we are
aiming to design is supposed to show a list of all books, create and edit
existing book titles, and categorize books to categories according to their
genre, such as crime fiction or sci-fi. Designing the structure and defining
the ground rules for standardizing such as app is important as the UI
experience of a user should not differ from page to page.
The Process
Here we have our first
brush with the iterative and incremental approach offered by Rails. Below are
the steps required to develop any application in Rails:
Create a Rails Web
Application shell (empty app)
Choose Rails’ default
database name or specify one yourself
Create the database if
it doesn’t exist
Pick and choose your
application’s features
Create the tables that
your app will use, if they don’t already exist
Create a code base for
the tables
Optimize and modify the
code as per your need
Repeat steps 4 -7 till
your application development is complete
Step 1 - Create a Rails Web Application shell (empty
app)
Rails provides an
endearing feature where every Rails app has the same core structure. So,
whenever you want to create a new app, Rails automatically generates a
structure for this application. This is something that many Ruby on Rails
consultants cherish as it affords them the extra bandwidth that they can invest
in thinking of innovative features for the app. Your app will always reside
under the Rails Root directory which may be termed differently based on the
environment you use. Open a command prompt window and find your way to this
directory. All you have to do now is christen your app. Type rails library
(remember, our app is for a dynamic database of books?) and voila! Rails
creates your app subdirectory and a tree of folders and files – your empty
Rails app. Rails automatically writes code to most of these files in the
various subdirectories. But there are a few that need a special mention:
app/controllers –
contains all the controller classes. A controller is a component that handles
incoming web requests from users.
app/views – contains
display templates that are converted to HTML after filling in data and returned
to the user’s browser.
app/models – contains
classes that model and wrap the application database contents.
app/helpers – contains
helper classes to do what their name suggests: help the model, view and
controller classes in their function.
Step 2 - Choose Rails’ default database name or
specify one yourself
The database we need to
use for this application needs to be specified in a fixed format; its name
concatenated with development, which in this instance means our database will
be called library_development. We should also try and leave the development
database password blank as it is a convention followed by Rails. If you ever
need to modify the database name or password, all you have to do is access and
edit \library\config\database.yml.
Step 3 - Create the database if it doesn’t exist
Now, we create our
database. Ensure that the MySQL engine is running and log into the command
prompt as a root user. Enter and execute the following commands:
mysql –u root –p
create database library_development
grant all on library_development.* to
‘ODBC’@’localhost’;
exit
Step 4 - Pick and choose your application’s features
Here’s what makes Rails
different from other application development technologies. Any data we assign
to rails, it assumes that we will need to create, read, update and delete it.
In our case, we too need to create book titles, edit them, delete them, etc.
Therefore after specifying the tables we want for the app, Rails will
automatically generate all the basic code. Now, do you understand why Rails is
up to 10x faster?
Step 5 - Create the tables that your app will use, if
they don’t already exist
We are not going to
dwell on creating on tables and defining foreign keys here. All we need to know
is that 2 tables are required, one for the book titles and another for the categories
with a one-to-many relationship.
After creating tables in
MySQL, on the command prompt ensure that you are in the library_development
directory and execute the following command:
mysql cookbook2_development <db\create.sql
If you return back to
the command prompt, without any messages or error, everything went fine.
Step 6 - Create a code base for the tables
Here, we use scaffolding
– a concept unique to Rails that allows us to generate a basic application
structure without breaking a sweat. Execute the following command on in your
app subdirectory:
ruby script\generate
scaffold book book
This generates the model, view and controller files for the section of
our app that will use the Titles tables. We do the same for the category part:
ruby script\generate scaffold category category
Step 7 - Optimize and modify the code as per your need
We will use Mongrel; a
popular Rails-friendly web server for hosting our app locally. In the library
subdirectory execute the following command to rev up Mongrel:
mongrel_rails
start
And, we are done! A few more lines of code would be required to patch
things up and display proper messages but mostly, our app is up and running in
the blink of an eye!
We are a Ruby on Rails development company that has been leveraging its
extraordinary advantages for quite some time, to design and develop
cutting-edge application for our clients. We provide offshore software development services to companies and organization across the globe and have
achieved a 100% development rate doing the same. If you wish to harness the
tantalizing power of Ruby on Rails for the development of your application, do
not hesitate to get in touch with us and hire RoR developers from our talent
pool. You web application will be up and running in no time, and will function
par excellence; that’s a promise!
Wednesday, 15 August 2012
WordPress Theme Release Rulebook – The Works
The demand for customized websites developed with
the latest Content Management Systems (CMSs) has seen an exponential rise.
Right at the top of the CMS lot is WordPress. As we speak (or rather, type!),
there are countless individuals and companies looking to hire WordPress programmers to conceptualize and develop their websites for varied purposes,
such as Ecommerce, informative portals, company intranets, etc. Specially
designed themes play a significant role in the WordPress development. What’s in
a theme, some would say. Maybe, but its more about what should be borne in mind
before setting up a WordPress theme for sale on popular marketplaces such
ThemeForest.
First up, do you like protected posts, where
unauthorized viewing is restricted via password? Inserting a simple
post_password_required () check in the comments.php file will ensure this.
Creating an attachment.php file, even if a template does not exist, is
advantageous as it helps visitors to your site view images in full screen mode
with the site navigation still accessible. Modifying the rtl.css file will
override the main style.css file and set WP_LANG variable to accommodate right
to left written languages, such as Arabic and Hebrew. This helps keep your site
flexible and open to posts from visitors across the globe. You can even supply
an editor style by setting up the TinyMCE editor on WordPress. To ensure that
your visitors can read paginated entries, insert the wp_link_pages tag within
the loop.
Additionally, check that all the default widgets
displayed by WordPress are visually appealing and have the best display
resolution. Never forget to insert the wp_footer() before closing the body tag
and the wp_head() before closing the head tag. Custom menus and custom
backgrounds are supported by WordPress 3.0, which means you have to take extra
care when posting a theme. You can also ensure that user-strings are
translatable to languages other than English. After completing the design, make
the theme consistent and run the WordPress.org Theme Unit Test for ironing out any creases left behind.
We, at GoodCore have gained credible expertise in
the development of WordPress-based portals and websites. You can hire wordpress
programmers from us. We are also a mobile app development company at the
forefront of the smartphone revolution, bringing new cutting-edge apps to the
table every passing day.
Android: Reigning Supreme in the US
Witnessing a potential medal-winning
athlete regaining lost ground and coming to the fore, is a wonderful and
breathtaking sight. Compare the life span of the Android OS to such an athlete,
and you will find surprising similarities. Always touted to be a frontrunner
for the best OS spot, Android has garnered undying admiration from users and
developers alike. Many an Android app development company has made a fortune
leveraging the capabilities on offer from this OS.
Rising like a gladiator fending off
competition in the Colosseum, Android has upstaged and stunned many leading OSs
on its ascent. A recent survey shows that Android has made up for lost ground
and once again built a steady lead over the Apple iOS. The first quarter of the
year seems to portray Android’s market share at a whopping 61%. This means all
the other mobile operating systems such as Apple iOS, RIM and Windows Phone
hold a cumulative market share of only 39%. This is great news for offshore Android development companies as they can prepare in earnest for a rise in the demand
for cutting-edge and highly intuitive apps. Smartphone sales are also up,
accounting for 66% of all handset sales in the US.
Market Share Highlights for Android:
- Increase in market share after poor holiday season
- Market share up to 66%
- Relegated all other smartphone OSs to a total market share of 39%
- Claims 90% of market share combine with Apple iOS
- Smartphone sale up to 66%
All these are encouraging trends that
point towards the need for rapid Android app development. GoodCore is an Android
app development company that has been sensing the Android OS pulse right from
its inception. Priming its team for the tremendous boom in the requirement of
Android apps, GoodCore has delivered path-breaking apps to clients around the
globe. Proving to be a trusted offshore software development company, GoodCore’s Android
development capabilities have earned it a wide base of esteemed clients around
the world. If you want an Android developer for hire, approach GoodCore. When
you hire Android developers from us, you don’t just hire talent, you hire an
assurance of complete satisfaction!
An AVG Safety Net for Android Users
The
independent Android app marketplace has been a favorite
haunt for the burgeoning Android user community. As the number of users and the
acceptance level of Android as an operating system go on increasing, more and
more enterprises and entrepreneurs will look to outsource Android development
for conceiving an innovative app that generates high ROI. The only concern that
plagues the Android app development arena is safety. When downloading or
updating an existing app there are chances that malware may also sneak into
your phone or tablet.
Not
anymore! AVG, one of the leading security-suite makers has partnered with independent Android marketplace and
Livewire (mobile content provider) to ensure that all apps hosted by them are
scanned for malware before being made available for download. Going one step
ahead, AVG has also decided to offer their free Android security app,
Mobilation for installation on mobile devices for scanning apps after updates.
Coming
from the stables of a security-suite provider like AVG, who provided the widely
accepted and appreciated safe e-mail scanning service; this should put Android
app development companies across the globe at ease.
Advantages:
- Free Android security App – Mobilation
- Clean app download experience
- Safe updates and downloads
- Secure “Download to Update” safety promise
- Possibilities of security being extended to other mobile content provider
Monday, 6 August 2012
Augmented Client-side Storage with HTML5 in ASP.NET
If you are designing and developing a website using
ASP.NET then this forms a pertinent question for you. How do you want to store
application data on the client side? The optimal solution that any .NET development company would prefer is HTML5 Web Storage. Being a streamlined data
storage mechanism, HTML5 stores data at the client’s end as key-value pairs.
At the server-end, data storage is never an issue with
RDBMS solutions. Traditionally, dedicated .NET developers used to store data at
the client’s end in the form of cookies. W3C provides 5MB per origin storage
space for HTML5. Juxtapose this with the size for cookies (4MB), and the reason
is evident why HTML5 Web Storage should be preferred. But, let’s not jump to
conclusions as there always is a catch to every situation. Cookies are passed
instantaneously between the client and server automatically, in sync with a
website’s every request. Web Storage does not do this, and you need to
establish a programmatic construct using methods like JQuery to call a Web
Method or a WCF service. The data in the Web Storage cannot be cleared by
setting an expiry, unlike Cookies. You again would need to adopt a programmatic
approach for the same or use a browser-based UI dialog box for clearing the
same.
You can implement Web Storage in two forms; session
storage, which lasts as long as the current instance of the browser exists or
local storage, where data persists across multiple sessions. These can be
manipulated using the sessionStorage and localStorage attributes of the window
object. Single transactions are where session storage is ideal as data ceases
to persist as soon as the user shuts down the browser instance. In local
storage, the data is trans-session persistent and therefore can be used for
future access to the same website. Even closing the current browser instance
does not remove the data. Below are some of the key-value pairs with almost
identical properties and methods for session storage and local storage:
setItem()– stores a key-value pair in the respective Web Storage objectgetItem()– retrieves value of a specified key from the respective Web Storage objectremoveItem()– removes a specified key-value pair from the Web Storage object under considerationclear()– removes all the key-value pairs from the Web Storage objectkey()– takes a 0 based index and returns key name at that indexLength– returns the total number of key-value pairs present in the Web Storage objectremainingSpace– returns the amount of storage space in bytes still available for storing data. This property is specific to IE. Other browsers may implement similar property.
You can now go ahead and implement one
these methods for storing application data at the client’s end. At GoodCore, we
are always on the hunt to redefine programming paradigms. Optimizing processes
and developing new ways to reduce product development lifecycles is an inherent
goal at GoodCore. Being an offshore software development company, we provide
cost-effective offshore .NET development services that are world-class and are
sure to help you conceive the web application of your dreams in reduced
timeframes.
Friday, 15 June 2012
Optimum PHP Database Connectivity - The PDO Way
Hypertext Processor or PHP, as it is more
commonly known, has entranced the minds of developers worldwide. It is a
general-purpose scripting language that can be embedded in HTML. One of the
major advantages of PHP is its ability to talk with a variety of databases.
This adds the much-needed interactive dimension to websites whereusers can
fetch dynamic data and perform transactions. The heart of any web application
is not its UI or its controller; it’s the database that stores and provides
data based on the queries that are made to it. PHP, being a widely popular
programming language, is adopted across the world by dedicated PHP programmers
handling large-scale projects for firms providing PHP web development services.
If you are one the countless offshore PHP developers who have handled database
interactions, and still use the traditional PHP MySQL API for database
connections, then this article is precisely targeted at you.
Did you know PHP offers 3 types of APIs for
database connectivity? No? Well, here’s some information on them:
- MySQL – The most popular API which establishes database connectivity in the easiest of manners.
- MySQLi – An ‘Improved’ version of the MySQL API.
- PDO – PHP Data Objects, an API that is database agnostic and supports prepared statements, thus negating the requirement for SQL Injection.
Looking at the above points, some might say feel
that MySQL seems to be the easiest way out, then why should we try anything
else! Well, let us give you three reasons. Firstly, some of the commonly used
MySQL API database connectivity code snippets are all set to be deprecated as
they do not adhere to the best practices policy are not exactly the right
learning that greenhorn developers should pick up. Second, if you need to
escape user input, you need to specifically do it from the code, which can be a
complex endeavor, especially if you are new to database connectivity and don’t
have a clue about data sanitization. Third and the most important point; the
MySQL API is inflexible which means you will come up a cropper if you decide to
switch databases. Reason enough to consider PDO?
Remember the traditional way of connecting to a
MySQL database:
# Connect
mysql_connect('localhost',
'username', 'password') or die('Could not connect: '. mysql_error());
Now consider the PDO technique where we create a
new class instance, specify the driver, database name, username, and password:
$conn=
newPDO('mysql:host=localhost;dbname=myDatabase', $username, $password);
The main advantage of this technique is that in
the event of switching of databases, you can simply update the DSN. This
reduces your dependency of MySQL and eliminates the absolute necessity of
functions, such as mysql_connect.
But what about errors, you will ask! If the
database connection is not established, how do we check the error? PDO offers 3
error mode options to deal with exceptions:
- PDO::ERRMODE_SILENT
- PDO::ERRMODE_WARNING
- PDO::ERRMODE_EXCEPTION
The default error mode is PDO::ERRMODE_SILENT,
which does not throw up any exceptions. You must remember to change the default
mode to PDO::ERRMODE_EXCEPTION which throws up exceptions as soon as they occur
and stops the execution of the script. You can write a simple try-catch code
block to capture these exceptions. Failure to do so will require you to
manually fetch these non-captured errors.
Now comes the most important part, the core
function; retrieving information from the database. This can be done using two
options, query and execute. The query method involves using the PDO::Quote
method to manually escape data and is almost similar to the mysql_real_escape_string.
A word of advice here; if you are dealing with data that a user fills in to a
form, use prepared statements instead. For any other data that is not form
data, the query method is ideal.
Prepared statements are used via the prepare
method that use named parameters, eliminating the need for SQL injection. These
statements are then executed by passing data into the named placeholders. Now
we come to the part of receiving the data that is fetched by prepared
statements.
The PDO API provides multiple options to
interact with the result. These include:
- PDO::FETCH_ASSOC – default response, returns an array
- PDO::FETCH_BOTH – returns an array, indexed by both column-name, and 0-indexed
- PDO::FETCH_BOUND – returns TRUE and uses PHP variable for assignment of values in the columns
- PDO::FETCH_CLASS – returns a new instance of the class used
- PDO::FETCH_OBJ – returns an object that contains property names associated with columns
The PDO prepare extension is especially suited
to the execution on the same query multiple times, each time with separate
parameters. You can easily perform the common CRUD tasks that every PHP
developer handles day in and day out. But the advantage that rises above all
these features, is the usage of an object or class instance for mapping query
results. These inherent advantages
should be proof enough for you to switch over from your old MySQL API to PDO.
It will not only make your code more secure, but also streamline it to a great
extent. And who can forget the coveted flexibility to switch over to any
database! All of you, the PHP developer community including all offshore PHP developers, go PDO now, if you haven’t already!
We are GoodCore, a leading offshore software development company in Malaysia. Having garnered expertise in every
cutting-edge web development technology that emerges in the market, we apply
our skills to the conceptualization, development and deployment of
clutter-breaking solutions for clients across the world. We ensure that our
team of developers, programmers and consultants are on top of every new
development in the technology arena and are primed to lend that advantage to
your product. Over the years, we have gained the trust and credibility of many
elite clients across the globe. We wish to extend the same quality of services
to you. You can hire dedicated PHP developers from us who will help develop
cost-effective solutions that match your requirements to the T. If you wish to
develop state-of-the-art PHP solutions that are not just path-breaking, but
also ROI-intensive, don’t hesitate to approach us. Our vast repertoire of
talent is at your service!
Friday, 1 June 2012
Single Page Application Development – The ASP.NET Way
Heard of Single Page Application
framework? If you are into custom .NET development, we are sure you must have.
The inherent advantages of a Single Page Application (SPA) make it a prime
focus ASP.NET developers committed to the development of highly responsive web
applications that are devoid of post backs and do not lead to page reloads.
When you have applications that run like native apps on your machine the
response times and the overall user experience are bound to be exceptional.
SPAs are similar to the
applications that can be developed using the combination of AJAX and
XMLHTTPRequest, or Iframe; but build on the shortcoming of these technologies
by leveraging the ASP.NET MVC4 Beta framework. Using a parameterized URL for
the definition of different operations that you wish to complete, Single Page
Applications also use the history.js library. This means that not only is the
state of the web page maintained, but also the browser back option functions
normally and saves the state of the page. All this, in spite of the processes
being rapidly executed on the client side! Additionally, SPAs work very well in
tandem with HTML5’s advantageous features such as LocalStorage and Application
Cache that are quintessential for the development of offline web applications.
Advantages of Single Page
Applications:
- Rich and interactive application development
- Potent blend of template binding scripts, Data Model scripts, services, and data templates
- Integration with LocalStorage and Application Cache features of HTML5
- Simplified SPA development via ASP.NET MVC4 Beta framework
- Rapid SPA development combined with an elegant UI
Further simplification is on its
way, with the development of SPA Template Project nearing its completion. You
can run the NuGet command line utility residing in the Package Manager
Console available under the Tools menu and just type Install-Package
SinglePageApplication.CSharp. The
resulting template is quite enhanced and should offer seamless SPA development.
If you
require custom .NET development services, approach GoodCore, an ASP.NET development company that prides itself on the development of path-breaking .NET
solutions catering to a wide array of industry verticals and global businesses.
Being a leading offshore software development company, GoodCore possesses a
team of dedicated .NET developers primed to realize every .NET application
development requirement. If you are looking out to hire dot net developers,
look no further than GoodCore. We promise to deliver and exceed all your
expectations!
Monday, 14 May 2012
Docrails – Freedom to Undertake Documentation Fixes
Code and bug fixes are a common trend
related to every application development technology. But, documentation fixes!
Now, that’s something of a rarity. Ruby on Rails experts take pride in being
associated with a technology that not just facilitates rapid open source web
application development, but also allows the ever-increasing RoR developer
community to make quick fixes to the documentation of Ruby on Rails.
Simplification of processes and
ease-of-use has been a trait of RoR that has led many a Ruby on Rails development company to garner major
successes in the app development arena. Docrails takes this feature even
further by simplifying the entire process of doc fixes. What used to be a
tedious process of opening a pull request and following a long workflow, has
now been reduced to a simple clone, edit, and push cycle. Easing the doc fixes
submission process is the major focus of Docrails and so it includes a public
write policy that offer contributors unparalleled freedom. Even though it has a
different access policy and can be termed as a separate branch, Docrails is
still the authentic and actual RoR documentation; so don’t fret, your efforts
are not in vain!
Features of Docrails:
- Easy submission of fixes to any RDoc, guide, and README file
- Treatment of documentation as an integral part of RoR, not as a separate project
- Release of fixes in tandem with the release of the branch containing the fix
- No fixes allowed to the code
GoodCore is a Ruby on Rails development company
that has been riding the crest of the rapid web application development
technology wave. With dedicated Ruby on Rails developers committed to
the realization of every RoR application development dream, GoodCore has built
its credibility through the development and deployment of innovative and
state-of-the-art solutions. If you want to leverage the advantages of a
cutting-edge web application development technology such as RoR, then hire Ruby on Rails developers from GoodCore and
witness unparalleled efficiency and technological expertise being invested into
the creation of your applications!
Subscribe to:
Posts (Atom)








