Use Wufoo integrations and get your data to your favorite apps.

Category: programming

There are 10 posts published under programming.

Urchin: Building a better API for Drupal

As web developers, we have numerous tools at our disposal to build a platform.

 

Drupal is one such tool that we keep returning to, due to its flexibility, great community support and quick deployment. In the past year alone, Ashe Avenue has launched Drupal sites for everything from high volume magazines to grassroots music organizations, all with very aggressive launch schedules.

 

That being said, I actually want to discuss what Drupal does not do very well: present data in a consistent manner. As Ashe Avenue’s Lead Front-end Developer I have noticed that whether it’s a custom module, theme or whatnot, retrieving and displaying entity data is anything but uniform. Often, it ends up being a mess of node object references, scattered views, and render arrays peppered with various core function calls. These inconsistencies create code that is difficult to read, maintain and makes you want to sweep it under a rug.

 

In order to overcome these issues Tim Boisvert, Ashe Avenue Lead Developer, collaborated with me to create Urchin. Our goal was to achieve the following:

 

• Create a chainable set of functions for querying the database for entities and their field data
• Create a function for retrieving a specific field’s data given an entity, no matter the field type
• Ensure that Urchin would be portable to any Drupal site

 

With these goals in mind, we created what became the core of Urchin, the Article and Node classes.

 

One of the great things that Drupal 7 introduced is the EntityFieldQuery (EFQ) class, which helps developers build database queries without having to write a number of joins and conditions. What’s not so great about EFQ is that it’s still pretty verbose. Let’s take a look at some sample EFQ code that’s written to load the ten most recent nodes of type ‘article’.

 

$query = new EntityFieldQuery();
$query->entityCondition(‘entity_type’, ‘node’)
           ->entityCondition(‘bundle’, array(‘article’))
           ->propertyCondition(‘status’, ‘1’)
           ->range(0, 10)
           ->propertyOrderBy(‘created’, ‘DESC’);
$result = $query->execute();

 

I should also mention that the above code only returns a result array of node IDs, which in turn must be loaded and looped through in order to finally display the relevant data. Contrast that code with the following Urchin statement, which returns a nice and clean associative array of node data after executing the query (no entity_load() calls necessary!):

 

Article::get()->limit(10)->sort(‘recent’)->execute();

 

So…what’s going on here? The get() function creates a new EFQ instance with a few predetermined settings and returns that instance for other chainable functions to manipulate. Each chainable function is essentially a shortcut for EFQ with a little added pizazz to make your life easier. The beauty lies in the simplicity of the execute() function, which does two very important things: 1) executes the EFQ instance and 2) loads the resulting node data using Node::getNodeData(). Without getting into too much detail, getNodeData() essentially loads all of the fields for each node using the getField() function, which is the magical function I described earlier that helps us retrieve any field type’s data.

 

The getField() function may seem simple, and it is, but we believe that it really streamlines the way a node’s field data is referenced. For example, you’re on a node template and you need to access a field named byline and you don’t want to use render arrays. You might write something like the following:

 

$node->field_byline[$node->language][0][‘value’]

 

Yikes! The above technique can get unwieldy with complicated data types — such as fields that support multiple values — and can throw errors if you aren’t careful due to a reference to an unset object property. Contrast the above with Urchin’s getField() below:

 

Node::getField($node, ‘field_byline’)

 

Easy peasy. getField() performs all the necessary isset() checks to avoid errors, supports multiple value fields, and even automatically loads and retrieves the data for node reference fields.

 

In addition the above examples Urchin contains many other functions that ease development. We feel that Urchin has exceeded our expectations in terms of making a Drupal site easier to use, maintain and scale. After installing it on a few sites, we open-sourced the tool to allow for community input.

 

While we feel that most Drupal sites will benefit from an Urchin installation, there is still more work to be done. Urchin is great at retrieving data, but currently it can’t manipulate or save data to the database. Furthermore, the Taxonomy functions are useful, but not as powerful as we would like them to be. These are features we plan to release in the near future and we gladly welcome any collaborators that would like to share in the development of Urchin.

 

Let me know: What features would you like to see in Urchin?

867

Easily Get Your Open Source Framework Onto Openstack

The number of open source frameworks that are available today is continuously growing at an enormous pace with over 1 million unique open source projects today, as indicated in a recent survey by Black Duck.

 

image001

 

The availability of these frameworks has changed the way we build products and structure our IT infrastructure. Products are often built through integration of different open source frameworks rather than developing the entire stack.

 

The speed of innovation is also an area that has changed as a result of this open source movement. Where, previously, innovation was mostly driven by the speed of development of new features, in the open source world, innovation is greatly determined by how fast we can integrate and take advantage of new open source frameworks.

 

Having said that, the process of trying out new open source frameworks can still be fairly tedious, especially if there isn’t a well-funded company behind the project. Let me explain why.

 

Open Source Framework Integration Continuum

 

The integration of a new open source framework often goes through an evolution cycle that I refer to as the integration continuum.

 

image003

 

A typical integration process often involves initial exploration where we continuously explore new frameworks, sometimes without any specific need in mind. At this stage, we want to be able to get a feel of the framework, but don’t necessarily have the time to take a deep dive into the technology or deal with complex configurations. Once we find a framework that we like and see a potential use for it, we start to look closer and run a full POC.

 

In this case, we already have a better idea of what the product does and how it can fit in our system, but we want to validate our assumptions. Once we are done with the POC and found what were looking for, we start the integration and development stage with our product.

 

This stage is where we are often interested in getting our hands on the API and the product features, and need a simple environment that will allow us to quickly test the integration of that API with our product. As we get closer to production, we get more interested in the operational aspects and need to deal with building the cluster for high availability, adding more monitoring capabilities and integrating it with our existing operational environment.

 

Each of those steps often involves downloading the framework, setting up the environment and tuning it to fit the need of the specific stage (i.e. trial, POC, dev, production). For obvious reasons, the requirements for each of those stages are fairly different, so we typically end up with a different setup process with various tools in each step, leading to a process in which we are continuously ripping and replacing the setup from the previous step as we move from one stage to the next.

 

The Friction Multiplier Effect

 

The friction that I was referring to above refers to a process for a single framework. In reality, however, during the exploration and POC stages, we evaluate more than one framework in order to choose the one that best fits our needs.

 

In addition, we often integrate with more than one product or framework at a time. So in reality, the overhead that I was referring to is multiplied by the number of frameworks that we are evaluating and using. The overhead in the initial stages of exploration and POC often ends in complete waste as we typically choose one framework out of several, meaning we spent a lot of time setting up frameworks that we are never going to use.

 

What about Amazon, GAE or Azure Offerings?

 

These clouds limit their services to a particular set of pre-canned frameworks and the infrastructure and tools that most clouds offer are not open source. This means that you will not be able to use the same services under your own environment. It also introduces a higher degree of locking.

 

Flexibility is critical as the industry moves toward more advanced development and production scenarios. This could be a huge stop gap. If you get stuck with the out of the box offering, you have no way to escape, with your only way out to build the entire environment yourself, using other sets of tools to build the entire environment completely from scratch.

 

A New Proposition

 

Looking at existing alternatives, there is a need for a hassle-free preview model that enables a user to seamlessly take a demo into production with the flexibility to be fully customizable and adaptable. With GigaSpaces’ Cloudify Application Catalog, we believe that the game is changing. This new service, built on HP’s OpenStack-based Public Cloud, makes the experience of deploying new open source services and applications on OpenStack simpler than on other clouds. By taking an open source approach, it’s guaranteed not to hit a stop-gap as we advance through the process and avoid the risk of a complete re-write or lock-in. At the same time we allow hassle free one-click experience by providing an “as-a-service” offering for deploying any of our open source frameworks of choice. By the fact that we use the same underlying infrastructure and set of tools through all the cycles, users can take their experience and investment from one stage to the other and thus avoid a complete re-write.

 

Final Words

 

In today’s world, innovation is key to allowing organizations to keep up with the competition.

 

The use of open source has enabled  everyone to accelerate the speed of innovation, however, the process of exploring and trying open source frameworks is still fairly tedious, with much friction in the transition from the initial exploration to full production. With the new Catalog service many users and organizations can increase their speed of innovation dramatically by simplifying the process of exploring and integrating new open source frameworks.

417

Is Open Source A Good Business Model For Your Company?

While terms like “cloud,” “big data,” and “devops” may be over-used and over-hyped, it should be clear to anyone in the industry that we are undergoing a fundamental shift in the way IT is delivered, consumed, and even conceived. What is also clear is that this new era in computing is being both driven and dominated by open source.

Ask almost anyone what the most significant and exciting technologies are, almost anywhere in the stack, and you are likely to hear the name of an open source project. Ask about Big Data, and you will most likely hear Hadoop or Cassandra. Databases? MongoDB , CouchDB, and Riak. Storage? Gluster and Ceph, come to mind. Networking? OpenFlow and now Open Daylight. Cloud as a whole? OpenStack seems an unstoppable force. Mobile? It’s hard to ignore the tidal wave that is Android.  Application delivery and devops? Take your pick of Chef, Puppet, Salt, Jenkins, or Docker.

 

As Eric Knorr recently wrote, “We’ve come a very long way from the old saw that ‘open source doesn’t innovate.’ Instead, you might ask: Is innovation in enterprise software happening anywhere else other than in open source land?”

 

Of course, any discussion of open source inevitably comes around to someone asking, “While this may be great for innovation, can open source be a sustainable business model?” As someone starting his second stint as CEO of an open source startup, I can answer with an unequivocal, “It Depends.”

 

Open Source makes sense for an increasing number of situations, especially when a company is trying to disrupt proprietary incumbents or when (as is true almost everywhere) there is a limited window to become prominent in a rapidly changing ecosystem. Indeed, I would argue that, in many situations, trying to make it as a small open source company is far less risky than trying to gain acceptance as a small, proprietary company.  Open source brings its own unique challenges, however, and certainly isn’t appropriate for everyone.

 

With that in mind, here are some questions to ask if you are considering becoming an open source company. The more that you answer “yes” to, the more likely that open source is the right strategy for your company.

 

 

Am I trying to sell into a market with entrenched, proprietary competitors?

If so, being open source can get you into accounts that would never speak to a proprietary startup. Additionally, it gives you the opportunity to compete on battlegrounds that favor you over competitors with larger sales forces, marketing budgets, etc.

 

Am I trying to enable an ecosystem and are there important open source projects around me in the stack? 

If so, being open makes it much easier to form and integrate into an ecosystem.

 

Do I have a clear idea of how to add value on top of the open source version, while making the open source version robust and valuable?

There are many interesting variations on the open source model, but they all depend on having both a big “top” of the funnel (lots of people using, trying, or loving the open source product), as well as a clear reason for a meaningful percentage of those people to pay (e.g. a managed service offering, support). If the only way to get people to pay is to make the open source version substandard, you won’t likely succeed.

 

Will being open source make me radically better than the alternative or will it just make me a cheaper alternative to an already good solution?

The best open source companies use being open to make themselves radically better, at least for certain markets or applications. For example, MySQL wasn’t just cheaper than the proprietary RDBMs, it was better for PHP and helped enable an entire stack (LAMP).

 

Is the nature of my project such that “many eyes” and “many contributors” will make it better? 

In my experience, this is more likely to be true of fundamental technologies, and less likely to be true for things dependent on an elegant user interface.

 

Is my project such that being tested at very large scale is key to success?

While you may never get paid by large universities or national labs, there are few places better to prove your product out at massive scale.

 

Do I understand the implications of being open source on development, QA, sales, marketing, financing, etc.? 

Being open was key to Gluster’s success, and has been key to how Docker is approaching the market. The decision has had significant implications for all aspects of the company. You can’t be “half open” any more than you can be half pregnant. Make the decision wisely.

370

Top Startup & Tech News Today: 7 Things You Missed

CitizenTekk brings you the top startup & tech news today - August 18th, 2013

1. Ubuntu sets crowdfund pledge record for Edge smartphone.

Ubuntu Edge’s crowdfunding smartphone campaign has raised more money in pledges than any other similar venture. The London-based developer, Canonical, has raised $10,288,472 in pledge money. But, this is still far from their funding goal of $32 million. As per policy of Indiegogo, the fundraiser’s host, Ubuntu would have to return the $10 million if they do not meet their $32 million goal. If the goal is met, Ubuntu would like to deliver 40,000 phones to qualifying backers by next May.

The smartphone has received a lot of press and acclamation though, from companies and individuals alike. Last week, Bloomberg announced that it had made an $80,000 contribution, saying that the open-source initiative could benefit its clients and change the future of mobile computing. But, Mr. Shuttleworth did admit that the product might be too much of an outlier relative to current smartphones; many major telecom companies, then, would not consider backing it.

The proposed smartphone’s apps would look like standard mobile apps when the Ubuntu smartphone was used as a standalone device. But, the apps would change their user interfaces to that of a desktop application when the phone was docked with a monitor. The OS itself could support apps written in the HTML5 web language.

The crowfunding campaign ends August 21st. But, But Mr. Green says that Ubuntu’s current pricing is an “absolute bargain”. “The product was sound. I would not say it is expensive.”

2. After Jimmy Wales makes a stand against China, Wikipedia’s Chinese editor banned from leaving country

Wikipedia China editor Huang Zhisong has told Radio Free Asia (RFA) that he has been banned by authorities from leaving China until 2016. He believes this is to put pressure on him, and is a result of his frequent trips to Hong Kong, Macau, and Taiwan on Wikpedia editorial issues. When Huang Zhisong asked a local bureau agent why he could not leave mainland China, his response was that he should know the reason. This comes a week after Wikipedia founder Jimmy Wales said he would not comply with any form of censorship on Wikipedia’s Chinese site.

 

3. Cisco announced Wednesday that it will cut 4,000 jobs, citing a difficult economic climate.

These layoffs make up 5% of Cisco’s workforce. Cisco’s shares plunged 10% in after-hours trading after initially slipping 4% when Cisco released its fourth quarter fiscal results.

CEO John Chambers says that he’s “real pleased” but Cisco is “just not growing as fast as we need.” He isn’t worried at all about Cisco’s performance against competitors though. Overall, Cisco made $2.8 billion on sales of $12.4 billion for its fourth quarter. Cisco’s focus on Internet trends (such as video, wireless, and big data) has helped propel the company. Shares have risen up by 34% so far this year. The company has also stockpiled $50.6 billion in cash, which is $3 billion more than its previous quarter.

Since Cisco touches all part of the networking process, a large part of the company’s success is tied to the world’s economy. “A lot of [sales and growth] depends on GDP and global markets growth,” Chambers said. “We’re just not seeing it.”

4. The Only Startups That Matter To Job Creation

The idea that small business runs U.S. job creation is a common one. It is also an incorrect one. The Census Bureau shows that small businesses destroys jobs at nearly the same rate as it creates them.

The Kauffman Foundation has an insightful report showing that not all small businesses are equal-opportunity job destroyers. High-tech startups, unlike small businesses in general, create net new jobs.

In 2011, high-tech companies between one and five years of age created 16,700 jobs. Other similarly aged-businesses in the private sector overall lost 513,700 jobs. What’s more, the foundation concludes that startups aren’t located just in the Silicon Valley. Some most dynamic cities for high-startups include Missoula, Montana, and Cheyenne, Wyoming. But Colorado outshines them all, with Boulder, Fort Collins-Loveland, the greater-Denver area and Colorado Springs in the top 10 metropolitan areas marked by a density of high-tech startups.

This is all good news for the U.S. economy. There is more geographic and economic diversity among high-tech formations than the private sector in general. Results of other studies show that one high-tech job results in four others. Studies also show that the process of innovation and entrepreneurship, which is generally costly in the short term, leads to productivity growth. All in all, high-tech startups are good for the U.S. economy.

 

5. Bridging The Gap Between Tech Startups And The Fortune 500

How can a tech startup and a Fortune 500 company team up for mutual benefits? The most common ways are through corporate venture capital arms, contests, package of benefits geared to startups, and accelerator programs.

The main advantage of taking capital from corporate venture capitalists is that they become your internal allies at the firm. However, caution must be taken, as some of these investors may restrict your ability to exit to a competitor, as well as the possibility that the corporation may create something competitive with your product. It is for these reasons that some traditional venture capitalists are highly averse to working with corporate venture capitalists.

Fortune 500 companies also use contests to attract startups to work on problems the company cannot solve in-house. They also employ freebies to build relationships with startups. This not only promotes the company’s core services to new customers, but also hopefully locks the Fortune 500 company new and permanent customers.

The accelerator model has been around for a while and has produced some prominent companies; now, some Fortune 500 companies also want to get into the game. Nike, GE, and IBM are famous examples of companies that are trying to do so.

Startups should look into these opportunities and take advantages of the resources of larger companies, if it is possible for them and to their advantage.

6. Taxi-hailing apps offer unexpected benefit to minority riders

Taxi-hailing apps have become extremely popular in cities with infamously poor taxi services. However, minorities have found unexpected success using these apps to hail cabs that would otherwise have driven past them out of fear, xenophobia, and discrimination.

These apps “remove the uncertainty that you face that a cab driver will pass you by because they’re profiling you based on how you look expecting that you will maybe want to go to the outer boroughs like Brooklyn or Queens or sort of more nefariously potentially be a criminal,” says Stacy-Marie Ishmael. Ishmael said it is common for minorities to get passed over for travelers who look relatively “less brown” than them.

 

7. Wearable Computing Startup InteraXon gets $6 Million To Read Your Mind.

InteraXon is making a thought-controlled headband called Muse. They have managed to raise $6 milllion in Series A funding. They expect to release Muse in early 2014.

 

238

Top Tech and Startup News: 7 Things You Missed Today

1. John Carmack joins the Oculus team to work on the software for The Rift

John Carmack is a co-founder to the id software, and is most known for his programming work in the quake series. He has recently joined Oculus as Chief Tech Officer, where they have been focused on virtual reality technology. The goal for Oculus over the past year has been to develop a new type of hardware, where the user would be engulfed in a virtual reality while playing their game.
According to Carmack in an interview at QuakeCon in 2012 the prototype they are selling at the moment, is not meant for consumers. The project is still very much in the developmental stage and those at Oculus are hoping to get developers to look at their work and give feedback. In time after they work out all of the kinks, such as developing better software to support it and having more than one game to play on it, then it will be consumer ready. However, they recommend to those who want to support their project, wait until it would be worth the cost when it is software supported.
http://www.oculusvr.com/blog/john-carmack-joins-oculus-as-cto/

2. LiveScript, Julia and Elixir: Three Languages To Watch

 

Livescript is a JavaScript and CoffeeScript compatible language that is meant to be more user friendly. Livescript 1.2 was recently released, and is meant to be used at any point a person would use Java.

Julia is another language, more specifically meant for science, since it is more expressive with a larger library than most other languages that focuses on scientific computing tasks. Julia is not only a higher performance language, but is also faster than other languages.
Elixir is a modern version of Erlang VM, taking out what did not work in Erlang and keeping what did is a step forward to say the least. Some of Elixirs features are: list comprehensions, Metaprogramming via macros, and Protocol-based inheritance.
All of these more unheard of languages have massive potential, and have the purpose of making life easier for those who want to or need a language, but are unsure as to which is best for you. There are more than just the well-known and popularized languages such as JavaScript and Coffeescript.
http://adambard.com/blog/3-languages-to-watch/

3. A New Form of Terrorism: Hacker Terrorists

With the increasing dependency on the internet, a new form of terrorism is being achieved through hacking.
Michael Hayden, former NSA chief, calls these transparency groups “terrorists.”

 

But there are two sides to the story. Some see releasing sensitive information, as Edward Snowden did, as dangerous to the US government. Others see the transparency groups as “hacktivists” trying to bring light to unknown government activity.
Hayden jumps to the conclusion that hackers will target The World Trade Centers. “So if they can’t create great harm to dot-mil, who are they going after? Who for them are the World Trade Centers? The World Trade Centers, as they were for al-Qaida.” Said Michael Hayden during his Washington speech given on Tuesday, assuming that hackers want to target the US government for malicious reasons.
Although the conclusion given is from assumption, there is real fear with the dependency on technology today. When it comes to banking and personal information being out there, it is a real threat that personal and government information could be used for harm. Real terrorists, not just transparency groups, could use hacking to access private information from the government and use it to cause harm.
http://www.salon.com/2013/08/06/cyberscare_ex_nsa_chief_calls_transparency_groups_hackers_next_terrorists/singleton/

4. Google glasses are potentially disruptive and could violate privacy, but do the risks out way the potential benefits?

Some of the many points brought up against Google glasses, are the safety concerns when driving. It was said by “Henry Jasny, Advocates for Highway and Auto Safety’s general counsel. ‘It will be just like cellphones, which became too ubiquitous and popular while driving.”’ (Jessica Meyers) Also thought to be a privacy issue when it comes to doctor patient confidentiality, yet it is also believed google glasses could help determine a diagnosis.
Another point brought up by police, is that although it could help with evidence, the video could be turned off and on leaving out context, leading to more troublesome than beneficial proof. There is also potential use for piracy when it comes to movies in the theaters. Many places are already beginning to ban Google glass from being used, even though there is not even a release date for the product.
Senate Commerce Committee Chairman Jay Rockefeller believes that no matter what is thought of now, it will take time before any policy can be made. This is probably for the best, since the only way to know the full scale of issues and benefits brought by Google glass will be known once the product is out and used by large number of the populace and not just the few who got a hold of the prototypes from Google.
http://www.politico.com/story/2013/08/google-glass-to-see-fill-of-policy-questions-95194.html

 

5. Starting-Up your own business? Here are some tips

 

Good management is not the most important thing, companies who are just starting out often do not have the resources for it, and many big companies today started out very small with none at all. Although recently The Wall Street journal reported that cyber security was not going to be very big, Defense.net reported 9.5 million in funding. One thing to keep in mind is that most entrepreneurs often did not get in much legal trouble as teens, according to Arizona State University study.

 

However, if you are not looking to start a business, but instead invest in one, looking at the JOBS act and becoming an angel investor might just be the route for you. It is an easier way to get involved with much less risk than starting a business of your own.
http://online.wsj.com/article/SB10001424127887323477604578653960989851832.html

6. New OS based on Bluetooth could revolutionize the way we live

Estimote is a company looking to promote their new product that brings the physical world reality into smart phones. If you were to walk around a museum, all you would have to do is look at your phone and the nearest art to you would be instantly described. If inside a store all that you were looking at would be in your phone, no need to keep track of what you want to get in the future, because your phone would do it for you.
Right now the technology is going to work using “motes” simple waterproof Bluetooth devices that would connect to smartphones, not just to track where you are, but with enough motes around the world or in a shop. A smartphone could map out the store that customer is in, also keeping track of products looked at and what part of the store the person is in.
With this technology, there is some privacy issues, since the ability to keep track of where a person is at all times is a little scary. Who exactly would be able to get a hold of this information would be important. However, it could revolutionize the way people shop, by eliminating buying at a store, it could just be a floor room and order over the phone while letting someone else handle the delivery, such as amazon. Possibly finding cheaper companies with the exact same product that is in front of you. Right now a package of 3 “motes” is available to developers for $99.
http://www.wired.com/design/2013/08/how-a-startups-cheap-sensors-could-bring-shopping-and-mobile-computing-into-the-future/

506

How I Built Scaleable Web Apps on the M.E.A.N. Stack

“M.E.A.N.” is one of the coolest stacks to develop on .

 

In my opinion, M.E.A.N captures the essence of modern day web development. It neatly ties in the concept of a NoSQL database with a modern javascript framework and gets them to communicate via Node.js.

 

Getting started with the MEAN stack might seem very daunting at first. You might think that there is too much new technology to learn.  The truth is that you really only need to know “Javascript.” That’s right, MEAN is simply a javascript web development stack.

 

So, how do you actually get started developing on the MEAN stack?

 

The first step is to set up a project structure. I’ve found the following structure to make the most sense:

 

controllers/ db/ package.json server.js public/

 

This structure lets you keep the entire stack in a single project. Your AngularJS front end can go into the public folder while all your Express API logic goes into controller and your MongoDB collections and logic go into the db folder.

 

Now that you’ve set up a general project structure, you need to initialize your public folder as  an Angular project. It is best to do this using a tool called Yeoman.

 

Yeoman is a toolkit that makes it easy for you to get started with a variety of Javascript frameworks and other web frameworks like Bootstrap and foundation. You can learn more about Yeoman at Yeoman.io.

 

Installing Yeoman is pretty straightforward.

 

npm install -g yo

 

Yeoman is built around the concept of generators. Think of them as a set of rules that Yeoman needs to generate the project structure and files for your project. In this case, we will be installing AngularJS. First, you have to get the generator for AngularJS by installing:

npm install -g generator-angular

This code  will install the scripts and templates needed for you to bootstrap your Angular app.  Next, cd into your public directory we created and generate the project into this folder by running:

yo angular

It  will prompt you with a series of questions that will then tailor the generated files to your needs. Once this is done, you will notice that the structure seems like another node app and you’re right to think that!

Yeoman and the tools that Yeoman uses (like bower and grunt) are all using npm to get the modules they need to build your app.

To run your yeoman app, simply go into the public folder and run grunt server. Grunt is essentially made  for web apps. It has a set of rules you can find in Gruntfile.js that outlines what needs to happen for different options.

Running grunt server will run a small server that will serve your website. Grunt build will go through all your source code, minify HTML, JS, SCSS and images, and spit the result out in the dist folder.

You can learn all about yeoman and grunt at Yeoman.io.

Your basic development workflow would be as follows:

In one terminal window, you will have grunt server running. This will run your AngularJS app. In another terminal window, you can have your node app running, providing the API for your AngularJS app.

The reason I personally love doing this is because grunt server will refresh your browser on the fly when you make SCSS changes and this is very useful when you’re developing.

When it comes time to deploy to production, running grunt build will output an “optimized and minified” version of the website to the dist folder. This is the folder you can setup in your server.js Express.static and use when someone hits your node server.

app.use(express.static(__dirname + ‘/public/dist’));

As a developer building a scalable web app, MEAN has profound implications. You can leave all your templating to render on the client side, lessening the load on your Node server. Your Node.js code is exposed via an API that your AngularJS app can connect to. This  ensures that in the future if you want to build a mobile app or open up your API to third parties, it’s very simple since the API’s are already created.

Lastly, one of the more interesting things about the MEAN stack is that because it is so loosely decoupled, if you wanted to replace any of the technologies with another technology, you could easily do so without changing the other platform. For example you could replace AngularJS with Ember, or Node.js with Python.

2189

OpenStack's Third Birthday - a Recap with a Look into the Future

OpenStack was first announced three years ago at the OSCON conference in Portland.

I remember the first time I heard about the announcement and how it immediately caught my attention. Ever since that day, I have become a strong advocate for the technology. Looking back, I’ve often wondered why OpenStack earned my loyalty so quickly.

 

Was it because OpenStack is an open source cloud? Well, partially, but that couldn’t be the main reason for my interest. OpenStack was not the first open source cloud initiative; we had Eucalyptus, then Cloud.com and other open source cloud initiatives before OpenStack emerged.

 

But these open source cloud initiatives were started by unreliable companies that lacked the commitment for a true open movement. I knew that a real open source cloud movement couldn’t meet its potential as an industry movement if startups led it. I knew that experience in the field gave OpenStack a much better starting point.

 

I also knew some of the main individuals behind the initiatives and their commitment to the Open Cloud and that made me confident that the OpenStack project would have a much higher chance for success than its predecessors. After three years, the game is essentially over and it’s obvious who’s going to win the open source cloud war. I’m happy to say that I also had my own little share in spreading the word by advocating the OpenStack movement in our own local community which also grew extremely quickly over the past two years.

 

OpenStack as an Open Movement

Paul Holland, an Executive Program Manager for Cloud at HP, gave an excellent talk during the last OpenStack Summit in which he drew parallels between the founding of the United States and the founding of OpenStack.

 

Paul also drew an interesting comparison between the role of the common currency on the open market and its OpenStack equivalents: APIs, common language, processes, etc. Today, we take those things for granted, but we cannot imagine what our global economy would look like without the Dollar as a common currency or English as a common language, even if they have not been explicitly chosen as such by all countries.

 

We often tend to gloss over the details of the Foundation and its governing body, but those details make OpenStack an industry movement.  This movement has brought large companies, like Red Hat, HP, IBM, Rackspace and many others, to collaborate and contribute to a common project as noted in this report. The steadily growing number of individual developers year after year is another strong indication of the real movement that this project has created.

 

Thinking Beyond Amazon AWS

OpenStack essentially started as the open source alternative to Amazon AWS. Many of the sub-projects often began as Amazon equivalents. Today, we are starting to see projects with a new level of innovation that do not have any AWS equivalent. The most notable ones, IMHO, are the Neutron (network) and BareMetal projects. Both have huge potential to disrupt how we think about cloud infrastructure.

 

Only on OpenStack

We often tend to compare OpenStack with other clouds on a feature-to-feature basis.

 

The open source and community adoption nature of OpenStack enables us to do things that are unique to OpenStack and cannot be matched by other clouds, like:

  • Run the same infrastructure on private and public clouds.
  • Work with multiple cloud providers; have more than one OpenStack-compatible cloud provider with which to work.
  • Plug in different HW as cloud platforms for private clouds from different vendors, such as HP, IBM, Dell, Cisco, or use pre-packaged OpenStack distributions, such as the one from Ubuntu, Red Hat, Piston etc.
  • Choose your infrastructure of choice for storage, network etc, assuming that many of the devices come with OpenStack-supported plug-ins.

 

All this can be done only on OpenStack; not because it is open source, but because the level of OpenStack adoption has made it the de-facto industry standard.

 

Re-think the Cloud Layers

When the cloud first came into the world, it was common to look at the stack from a three-layer approach: IaaS, PaaS and SaaS.

 

Typically, when we designed each of the layers, we looked at the other layers as *black-boxes* and often had to create parallel stacks within each layer to manage security, metering, or high availability.

 

Since OpenStack is an open source infrastructure, we can break the wall between those layers and re-think where we draw the line. When we design our PaaS on OpenStack, there is no reason why we wouldn’t reuse the same security, metering, messaging and provisioning that is used to manage our infrastructure. The result is a much thinner and potentially more efficient foundation across all the layers that is easier to maintain. The new Heat project and Ceilometer in OpenStack are already starting to take steps in this direction and are, therefore, becoming some of the most active projects in the upcoming Havana release of OpenStack.

 

Looking Into the Future

Personally, I think that the world with OpenStack is healthier and brighter for the entire industry, than a world in which we are dependent on one or two major cloud providers, regardless of how good of a job they may or may not do. There are still many challenges ahead in turning all this into a reality and we are still at the beginning. The good news, though, is that there is a lot of room for contribution and, as I’ve witnessed myself, everyone can help shape this new world that we are creating.

 

OpenStack Birthday Events

To mark OpenStack’s 3rd Birthday, there will be a variety of birthday celebrations taking place around the world. At the upcoming OSCON event in Portland from July 22-26, OpenStack will host their official birthday party on July 24th. There will also be a celebration in Israel on the 21st, marking the occasion in Tel Aviv.

 

For more information about the Foundation’s birthday celebrations, visit their website at www.openstack.org.

253

Patents and Open Source: Having Your Cake and Eating It, Too

Contrary to popular belief, protecting your business through patents is not necessarily at odds with an open-source approach.

The two can be combined with successful results. One dynamic start-up working in machine translation software filed a patent in its early days—but the inventor still refined the technology via an open source platform, helping to turn the technology into an industry standard.

 
Patents have many uses. They are more than a barrier to keep rivals out. They can be the basis for fruitful collaboration or vital commercial intelligence.  They can also help you build brand value. Patents are an asset but also a tool. For small companies and start-ups, patents may convince wary investors in the cautious money markets. The IP in any innovative project, and how it is managed, can be the dealmaker: in the early stages of a new venture, it might be the only thing that can secure finance.

 

Take the example of German computer scientist Philipp Koehn, who together with his professors at the University of Southern California, developed and patented a new model for statistical machine translation.

 

Translation by computers had been around for a long time but, until Koehn came along, machine translation had not come close to reaching its full potential. Koehn and his team came up with a phrase-based model (translating words in their context, rather than one word at a time), which was a cut above the old sluggish word-based systems. Their new technique found the best statistical match for words based on how often they appeared in pairs of existing translations. The results were astounding. Today most of the big names in Internet translation have integrated this technology. For their invention, Koehn’s team was nominated for the European Inventor Award 2013.

 

By patenting their technology, Koehn and his team could secure crucial financing (from both venture capitalists and public research programmes), and after seven years their company, Language Weaver, was bought by SDL for $42.5 million. But Koehn later opted for an open source approach, convinced that it could lead to broader research, development, and usage. At the University of Edinburgh, he started an open-source platform called Moses, which he still runs today. A community of enthusiastic researchers around the world can directly access and contribute to the software, effectively crowd-sourcing improvements.

 

The economic benefits are two-fold: Firstly, many companies have already integrated the free open source technology into their organisations, creating a big user- and client-base. Secondly, a multitude of new software companies have been founded, expected to turn phrase-based statistical machine translation and related services into a several billion-dollar market in the coming years.

 

Koehn understood that there is a huge world market for ‘imperfect’ translations that allow people who need a quick translation to get the gist of what is being said. Today Moses is used by big companies for document and website localisation, so customers all over the world can read their instruction manuals or properly install a computer programme.

Patents on software?


This example shows that the traditional proprietary patent model is not incompatible with open source. But it also debunks another myth, mainly about so-called “software patents.” It is true that the lines of code in a programme are protected only by copyright (like the lines of text in a story), but not by patents. However, a great many inventions we know today, like GPS, wi-fi, Bluetooth and mobile phones all rely on software. If they are new and inventive or solve a technical problem (“How can I use satellites to guide me to my destination?”) they can be patented.

 

Such patenting is possible when the product or process of the invention offers more than mere lines of software. The resulting patent protects the invention regardless of the particular lines of code or computing language used in the underlying software. Koehn’s phrase-based model of statistical machine-based translation is one of these “computer-implemented inventions.”

 

Of course, the value of non-patentable inventions cannot be denied. Much of the service industry sector, and the creative industries, have little use for patents, despite innovating to a very high degree. After all, only a minority of businesses are innovating in sectors where patent ownership is relevant. Even so, there are many other ways in which the patent system can be used to create commercial advantages.

 

358

Ruby on Rails and Beyond: Scaling a Company

 

If you’ve spent time at a start-up, you know life moves pretty fast and technology moves even faster. Over the last several years, my experience with Ruby on Rails® has provided me insight not only into scaling a team with this popular web application framework, but also into broader lessons all start-ups should consider. Growth, business needs and the development process are often tangled, but they are exciting challenges that make our work so rewarding when it succeeds.

 

When I started at BillFloat in late 2009, the Ruby on Rails framework had a dedicated community and well-deserved reputation for ease of use and speed to market. A number of other venture-backed companies, including those in the financial sector, had trusted running their business on Rails. As an active Rails developer since early 2006, choosing Rails as our web application development framework was a natural choice.

 

Move forward several years and our needs in 2012 were broad, but not unique. We needed to scale our engineering organization. We needed to deliver multiple products. We needed to consolidate complicated business logic. We needed to accomplish all these tasks without disrupting existing business. While daunting, these needs in themselves reflected a positive and exciting truth. We were scaling because we were successful.

 

In the beginning, companies should just focus on a single Rails application and getting their product to market. If possible, think about horizontal scaling and partitioning off functionality as much as you can from the beginning. However, prove there is interest in your product before you invest heavily in adding complexity.

 

In the Rails community best practices change rapidly. Today’s hot gem or technique will be outdated within months. BillFloat’s experiences with processing long running jobs are a good example. We have changed our approach several times since starting.

 

In some ways, technology is the easier part of scaling. Adding servers, optimizing code, and refactoring are all well worn best practices within our industry. In addition, teams must manage dependencies between application tiers, other engineers and product management. Teams must practice agile development to scale effectively, including test-driven development, pair programming, feature-based branching with pull requests as well as continuous integration.

 

Scaling is also about people and organization. As you grow, you discover you need new people and new ideas. Even when you have the people and skills you need, communication among all the teams can be challenging. It is easy – and common – to slip into a mindset of just worrying about your own projects rather than the whole direction of the company.

 

New and growing companies often attract passionate individuals who are willing to put the time, energy and brain-power into pushing an idea to its full potential. Ruby on Rails can be a great tool to help get you started, and scale with you to the next level. To reach the greatest heights, however, you’ll need to remember the pieces that aren’t tied strictly to the technology.

 

Doug Reed (@dougereed) is CTO and Vice President of Engineering at BillFloat, Inc., a leading innovator in consumer credit delivery. 

348