Altabel Group's Blog

Archive for March 2013

Debates about which programming language is the best are always hard and heated. Likewise, there’s no ideal language that works for all web application project requirements. Wikipedia is written in PHP. Gmail is written in Java. Python is number one choice of Google and YouTube. Ruby is used to create Twitter and Hulu. Slashdot is written in Perl. Stackoverflow is written in C#.

Browsing for the best web programming languages, among dynamic ones, you’ll mostly see PHP, Python and Ruby listed. Back in the days several years ago PHP was admitted the best tool for web job but since then both Python and Ruby have matured and grown robust libraries and frameworks around them that make them better candidates for many web projects now.

Today many consider PHP to be great for average everyday web systems. Python and Ruby are thought to be more suitable than PHP for most web applications in general and for more advanced things in particular. Just like PHP, they are free, open source, run on an open source stack (Apache and Nginx / linux, windows and BSD), and play well with any database engine. However, Ruby and Python have better syntax and they both enforce good programming habits by their nature, especially Python. PHP encourages sloppy spaghetti code by its nature. Also, the object oriented features in PHP are very ugly because of its arcane, retarded syntax.

Let’s get deeper insights into these two web programming languages from various standpoints:

As mentioned before, Python and Ruby are two of the most popular dynamic programming languages used in high level application development. In fact, Ruby was built using some of the design elements from Python. Developers often prototype using these two languages before implementing on compiled languages because of their modularity and object oriented features. Many use Python or Ruby instead of Perl as simple scripting languages. Python and Ruby are popular among web developers as well because of their rapid development cycle, with Python boasting computation efficiencies and Ruby boasting code design.

a/ Philosophy
Python really believes that code readability is the most important thing. Hence, there is one-true way of writing code, or as it has been reformulated lately: “There’s a most understandable way to do something and that is how it should be done”. Python is designed to strongly emphasize programmer productivity and it likes things to be structured, consistent, and simple. Python syntax enforces strict indentation rules; in fact, indentation has semantic meaning in Python.
Ruby believes in giving programmer the flexibility, freedom and power. It was designed, first and foremost, to make programming fun for its creator, with guiding concepts as follow: “The Principle of Least Surprise” and “There’s more than one way to do the same thing”. The latter philosophy principle inherited from Perl is the reason why many Ruby methods have alternate names, which may lead to some API confusion among new practitioners. However, this flexibility enables Ruby to be used as a meta language for describing DSL. Also Ruby provides a better way to write concise and compact code. More into the expressiveness of the code and writing code that is clever.
Python people like libraries to be transparent and obvious how they work and hence is easier to learn, while Ruby people tend to provide clean and pretty interfaces with “magic” behind the scenes. This makes development very fast when you understand the magic, but frustrating when you don’t.

b/ Ease of Use
Python is known for its ease of use. It allows beginners to start building powerful sites more quickly, and has the power to grow in complexity keeping its ease of comprehension. For example, one of the hardest parts of coding is going back to what you coded long ago and trying to remember the logic of it. Because Python uses natural language with white spaces and indenting, it is much more clear and easier to read than languages like Ruby. That makes it easier to fix mistakes or do updates. Also, there are literally thousands of pre-built modules that can be snapped on to let you get up and running on the web immediately. Its intuitive introduction to object-oriented coding concepts, such as communities, modules, and libraries, allows you to move on to other related programming languages as they develop.

c/ Object Oriented Programming
Both Python and Ruby support object oriented programming. Still Ruby’s object orientation is considered to be more ‘pure’ in that all functions exist inside a class of some sort. Python’s object orientation is more akin to that of C++, which allows functions and statements that exist outside of classes. In Ruby, even global variables are actually embedded within the ObjectSpace object. Python doesn’t have global variables, instead using attributes of module objects. In Python and Ruby, an instance of literally any type is an object. However, where in Ruby all functions and most operators are in fact methods of an object, in Python functions are first-class objects themselves.

d/ Syntax
Ruby includes several syntactic features which make dynamic extension of and higher-order interaction with external (library) code more straightforward. In particular these are blocks and mix-ins. Most things implementable with block and mix-in syntax are also achievable in Python, they are simply less syntactically natural and clear, and so less commonly form the centerpiece of major libraries or common styles of programming. These features, combined with a lighter-weight syntax with fewer restrictions (whitespace flexibility, optional parentheses, etc), make Ruby more suitable to pervasive and relatively transparent use of metaprogramming.
At the same time, while this flexibility and the Ruby community’s tendency to use it for metaprogramming can facilitate aesthetically pleasing code, they can also create stylistic variation in how the language is used, and obscure the mechanisms by which code actually works. Python’s more restrictive syntax is intentionally designed to steer developers towards one canonical “pythonic” style to improve accessibility and comprehension.

e/ Style
Ruby code is organized into blocks, with blocks starting with various constructs and ending with the keyword “end”. Python code is indentation-sensitive, with successively larger indentation meaning tighter (nested) scopes. Python’s syntax has been described as executable pseudocode.

f/ Functional Programming
Both languages support some functional programming constructs, but Ruby is arguably better suited to a functional programming style. Lambdas in Python are generally very short, because lambdas in Python are restricted to expressions and cannot contain statements. Ruby’s lambda support is far more flexible, allowing for lambda expressions of arbitrary length.

g/ Speed
The standard CPython implementation is generally regarded as executing code slightly faster than Ruby.If speed is really an issue for a Python project, you also have the option to use Cython, Pyrex,Pypy (JIT) or the ShedSkin tools to compile your code into C or C++.

j/ Features
Both Python and Ruby are high level application development languages. Each of them is estimated to have a Capers Jones language level of at least 15. Both languages promote test driven development.
Both languages have full Unicode support, although the way that support is implemented varies. Python distinguishes between “Unicode strings” and “byte-strings”. Ruby, on the other hand, treats all strings as byte-strings with a semi-hidden flag which causes problems when dealing with badly-encoded data from third-party sources.
Both Python and Ruby support multithreading. Python has the Global Interpreter Lock (GIL), which negates much of the potential advantage of using threads; Ruby has a comparable Global VM Lock (GVL).
There are a number of functions that are available by default in Ruby but for which in Python it is necessary to import a module from the standard library. Python supports generators and generator expressions.

k/ Community
There are great communities behind both frameworks. Some people believe that Python has a more developed community in terms of libraries suited for data analysis, machine learning, natural language processing, scientific libraries. As for community folks, Python ones are believed to be conservative and afraid of change, while Ruby guys welcome changes and love new shiny stuff even if it breaks older things. Consequently, Python world is more stable, and you can update your installation without much troubles, but that also means new technology is only added very slowly.

l/ Frameworks
There are a number of Web frameworks based on both Ruby and Python. The most notable and leading are Ruby on Rails (Ruby) and Django (Python) based on MVC. Django is more declarative, with it you’ll have a clearer understanding of what’s actually going on. It lets you specify most configuration details yourself. Django creates a much simpler project structure. On the other hand, the centerpiece of Rails’s philosophy is called convention over configuration. Rails provides you with more defaults.

m/ Popularity
Python is generally more widely used than Ruby, according to most measures, but in the wake of the rising popularity of the Ruby on Rails Web application development framework Ruby’s popularity too has seen rapid growth.
Python is more mature general purpose nature vs Ruby’s more niche (Rails) usage. Python is stronger and sees use in automating system administration and software development, web application development, data manipulation, analyzing scientific data (with help of numpy, scipy, and matplotlib modules), biostatistics, and teaching introductory computer science and programming. Ruby+Rails holds a slight edge over Python+Django for web development and sees use in general programming, and has more mindshare.
In terms of cloud deployment, Python can run on Google-Cloud (Google-App engine). Though Ruby has very strong cloud deployment options in the shape of Heroku and Engine Yard.

Would you prefer Python or Ruby over PHP for implementation of your web project? And is it indeed a philosophy that you chose while selecting between Python and Ruby? Interested to hear your thoughts.

Helen Boyarchuk

Helen Boyarchuk
Helen.Boyarchuk@altabel.com
Skype ID: helen_boyarchuk
Business Development Manager (LI page)
Altabel Group – Professional Software Development

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

In our blog we’ve been talking a lot about best PHP frameworks, and many of them in particular: Yii, Symfony, Kohana. There are still lots of them, for sure, but today I’m going to focus on one of the most long-living and simplest ones – CodeIgniter or simply put-CI.

A piece of dry facts about CodeIgniter:

CodeIgniter is an open source rapid development web application framework, for use in building dynamic web sites with PHP. The first public version of CodeIgniter was released on February 28, 2006, and the latest stable version 2.1.3 was released October 8, 2012.

The two things that immediately strike the eye here are simplicity and a huge community. But the one important thing here to remember: if you’ve still decided to develop a big and complicated application on CodeIgniter, you will not be able to find lots of things to implement the needed functionality. Thus, we have defined the main CI’s advantage-its simplicity.

At the same time besides simplicity there’re observed lots of other advantages. Have a look at them below.

CI possibilities:

1. Simple to learn. If to compare CodeIgniter with alternative solutions, it is safe to say it’s the simplest one. Besides well-thought project architecture, developers didn’t dabble and provided perfect documentation. Really, CI’s documentation is detailed, well-structured and is updated operatively.

2. Security. Problems in the security system are inherent to every web-project, though with CI many of them are solved automatically. For instance, there is a special function for accurate filtering the received data for XSS, which allows not only deleting dangerous data but saving them into log. This is very convenient.

3. Extendability. CI is a very flexible and extendable framework. It’s a piece of cake to make the framework do new things. You just need to plug in a required helper/library/plugin and to rejoice the new functionality.

4. Rich possibilities. Together with CI there are delivered libraries, plugins, helpers that allow solving the tasks right away without reinventing the wheel. You don’t have to dig the code, it’s enough to use a special mechanism that will let you “rehabilitate” CI.

5. Active Record. In CI there is used a modified version of the pattern Active Record Database. With the help of Active record work with the database turns into a pure pleasure. You don’t have to write the endless “SELECT” for choosing the data, it’s enough to use the class’s methods which is only two small lines of code. Besides a simplified access to a DB, this class allows to forget about used DBMS. You can build an application using MySQL, and then launch it easily on Oracle. Moreover, AR allows (though a bit) to secure work with DBMS, as while framing queries all values are shielding.

6. High productivity. Such big possibilities haven’t influence CI’s productivity. It works really fast. Such high-speed performance is achieved because of a very “light” core. All additional libraries are plugged in only when needed.

7. MVC architecture. CI uses MVC (Model-View-Controller) architecture that allows separating logics from the image. While working in the team (programmers+designers), such approach will be in a high demand.

8. Support of a template system. Although using template system is not compulsory in CI, it is still can be used if you’d like to.

9. Search engines friendly. Due to its URLs, CodeIgniter is super friendly to search engines and is subject to indexation.

I believe the other PHP frameworks reviews are on their way. In the meantime, if I’ve missed something in the list, feel free to comment!

 

Nadya Klim

Business Development Manager

 

altabel

Altabel Group

Professional Software Development

E-mail: contact@altabel.com
www.altabel.com

This time I would like to tell you how to organize your startup if the bank or investor you referred to considered you project too risky for funding. Where to find the money to make the project happen?

The way to get this problem solved is crowd funding – financial phenomenon that became so popular these days.

What is crowdfunding?
Generally speaking crowd funding describes the idea how to raise the investment for the startup.

There are three types of crowd funding:

– Donation Model – campaigns gather hundreds of small donations to achieve a financial goal (growth/extension or start up). Donors choose their benefactors and feel good about contributing to an economic or artistic endeavor.
– Reward Model – supporters make a monetary contribution in return for reward of some sort. The rewards can be wholly intangible, such as being identified publicly as a supporter, or a T-shirt.
– Equity Model – investors receive an interest in the profits of the business that they are helping fund.

As you may see from the main models, to grow the startup besides the investors could be possible with the help of so called collective supporters/individuals. Due to the social funding platforms like Kisckstarter, IndieGoGo etc. so called donors/individuals pool their money to support the projects that seem attractive and financially successful. The amount of donation could be different and can vary from 5 to hundred dollars.

As the result crowdfunding becomes really thrilling process and encourages both as creators and the supporters, forming close relationships with each other.

As I make the focus in this article on how to raise the money with social funding platforms I would like to have a look at the Kickstarter as an example to see how it all works.

The following websites (SF platforms)/startups considered to be the main ones in crowdfunding: IndieGoGo, Kickstarter, and RocketHub. They serve well for two types of project: small business launches and big project launches.

Kickstarter – is an American startup founded in 2009 through its website, tools to raise funds for creative projects via crowd funding.

The funding spans on vary projects as webcomics, serial fiction, poetry events, divination, music, illustration, sculpture, movies, games and other media. According to the diary of Kickstarter startup the art projects are the leading ones, they consist 60% of all funded projects. In order to be sure I took a look at www.kisckstarter.com, so in the category of most funded projects since 2009 (from its launch) the first 10 positions indeed go to art projects: 1/art 2/ comics 3/ dance 4/ design 5/ fashion and then goes 6/ film and video 7/ food, 9/games and 10/music. From the Kickstarter’s launch from 2009 till 2012 the most funded project is Pebble: E-Paper Watch for iPhone and Android from design category. It raised 10,266,845$ from 68,928 backers. Then goes video game console Ouya with the fund of 8,596,475$. Accorsing to the published statistics of October 10, 2012 there were 73,620 launched projects (3,426 in progress), with a success rate of 43.85%. The total number of dollars pledged was $381 million.

Regarding the funding duration, primary there were projects with 30, 60, 90 days duration. After the analysis conducted the projects duration was cut to 60 days, because the success of these projects was more evident, 44% of such projects were successfully funded in respect of 24% with 90 days duration.

Also was discovered that if one person supports the idea/project the chance to have a successful result will increase to 52%, and the project funded on 30% from the required sum has almost 90% of the success to collect the entire sum.

So, one of frequently asked questions for new runners is how could I start the project on Kickstarter?

Of course everything begins with an idea, and then you need to go through the formalities. As we’re speaking about Kickstarter in US, you should be permanent US resident, have US address, US bank account, US state-issued ID (driver’s license), have a major US credit or debit card and to be 18 years old. Then follow the projects’ presentation with text, photos and video on your profile, you need also to decide on the funding duration and start-up budget. You have unlimited access to your profile and you could be able to make updates and edits. When you will be sure that the project is rather mature to be shown on public your video appears in the relevant category and additionally you could start your own promotion campaign in social networks to attract backers.

Funding process

If the project is fully funded you need to think over about reward for your supporters. Kickstarter takes 5% of the funds raised. Amazon charges an additional 3–5%. For supporters you may prepare different types of presents due to the backers’ sum donation. It could be a pen, T-shirt, DVD, books, a limited edition of the comic etc. Rewards can be priced between $1 and $10,000, and they must fall within the project guidelines.

The project is considered to be successful when it raises necessary sum for its launching. And you get all funded the money. If the project funding fails all the money came back to the backers.

If a project reaches its funding goal before time expires, projects continue to accept pledges until the funding deadline. There is no option to end a project early.

On average, successfully funded projects raise around 130% of their goal.

It should be also noted that all rights on the project belong to its creators.

Conclusion

Crowdfunding shows that nothing is impossible. This model proves that even a dollar counts and helps those who unable to finish or start the project by themselves. Kisckstarter is one of the websites/platforms that help to raise money for American residents and creators; in UK the largest crowdfunding platform is Wefund, in Finland – Brickstarter etc. So as was to be proved crowdfunding is very popular.

The basic idea of crowdfunding is to take money and then make money realizing your project. Sometimes the creators begin with the modest goal and at the end raise the sum that overcomes the initial one two or three times. In return the supporters receive the reward/present according to the amount of contribution made.
So if you don’t afraid and ready to share your ideas with community, would like to see your project in the reality, crowdfunding is the right place.

Hope that information presented would be use and interest of you.

Thank you in advance!

 

Katerina Bulavskaya

Business Development Manager

 

altabel

Altabel Group

Professional Software Development

E-mail: contact@altabel.com
www.altabel.com

When selecting a web application framework for a particular development project, it’s very important to compare and consider the advantages and disadvantages of the different frameworks that are available. With so many PHP based web application frameworks, it can be difficult to choose one. For this blog post I’ll be focusing on a very promising PHP based web application framework Kohana.

Kohana is a PHP 5 framework that uses the Model View Controller (MVC) architectural pattern. It provides a rich set of components for building web applications. Its main purpose is to be safe, simple and easy to use, and so it is.

A little of history

Kohana was created as a branch of the PHP framework CodeIgniter. It was originally known as the Blue Flame. The main reason for “splitting” into two separate projects was a shift to a more open to the public development model due to the fact that many people were unhappy with the speed of development and fixing errors in CodeIgniter. Rick Ellis – creator and owner of CodeIgniter – was happy to see a fork of his project, but refused to help. He pushed a new project to create its own documentation and advised to rename the project. In July 2007 Blue Flame was renamed into Kohana to avoid copyright problems in the future. Developers began to look through the dictionaries of Native Americans to select a word that doesn’t violate copyright rights. Finally the name “Kohana” was chosen which in Sioux language means “swift”, which is absolutely true about this framework.

Why Kohana is an awesome framework

Although Kohana reuses many common design patterns and concepts, there are some things that make Kohana awesome and stand out. These are the most important of them:

1. Quick and easy development process. Kohana is really a very fast framework. With it you may build applications easily and quickly. There are many common components such as translation tools, database access, code profiling, encryption, validation, and more. Extending existing components and adding new libraries is very easy. While benchmarking a framework is hard and rarely reflects the real world, Kohana stands out as it is very efficient and carefully optimized for real world usage.

2. Community manageability. What is great about this framework is that it is community, not company, driven. Kohana development is driven by a team of dedicated people that need a framework for fast, powerful solutions. There exists a very active community forum and IRC (Internet Relay Chat) channel means that most questions are answered very quickly. Moreover, as it uses the BSD license (permissive free software license), you can use and modify it for commercial purposes.

3. A simple routing structure. Kohana has an excellent routing mechanism with which we can manage different kinds of URLs. For a URI, the routing mechanism will search for the first matching rout and the remaining will be ignored.

4. Kohana is OOP framework. It means that everything is built using strict PHP 5 classes and objects. It offers many benefits such as visibility protection, automatic class loading, overloading, interfaces, abstracts, and singletons.

5. Simple and effective debugging and profiling tools. Kohana has very simple and effective debugging and profiling tools that help to identify and solve performance issues very quickly.

6. No code generators and endless configuration files.There are no code generators and endless configuration files, so setting up is fast and easy.

7. Extremely lightweight. Kohana has no dependencies on PECL extensions or PEAR libraries. Large, monolithic libraries are avoided in favor of optimized solutions.

8. True auto-loading of classes. True on-demand loading of classes, as they are requested in your application. There are no namespace conflicts. All classes are suffixed to allow similar names between components, for a more coherent API.

9. Cascading resources offer unparalleled extensibility. Almost every part of Kohana can be overloaded or extended without editing core system files. Modules allow multi-file plug-ins to be added to your application.

10. Customization potential. Kohana has powerful event handler. Observer-style event handlers allow for extreme levels of customization potential.

To sum it up, Kohana is really an excellent framework because of many nice features incorporated in it. It is more scalable, flexible and light weight than many other well known frameworks. It is very fast, very efficient and carefully optimized for real world usage. So if you are looking for a feature rich, flexible, fast and sensibly configurable PHP framework, then look no further than Kohana.

Thank you for attention! As usual, please feel free to share your thoughts in comments. 🙂

Yuliya Tolkach

Yuliya Tolkach
Yulia.Tolkach@altabel.com
Skype ID: yuliya_tolkach
Business Development Manager (LI page)
Altabel Group – Professional Software Development


%d bloggers like this: