Wednesday, December 17, 2014

Angular.js

There is a lot of demand in the tech community for AngularJS. Many companies currently maintain sophisticated data intense web front ends and would like to migrate to Angular. Some others are looking into starting new projects. They heard about Angular and they wonder if they should start straight on Angular or just implement a traditional Javascript/JQuery solution. And there are other companies that are already on Angular, they love it and want to expand on it!

I decided to write this article as the technology is relatively new and there is a certain learning curve for decision makers and IT personnel. Business decisions and productivity can very well be influenced with this technology.

AngularJS is a web applications framework developed by one of the teams at Google in 2009. They were experienced front end developers who felt a need to simplify both development and testing of front end components / web based user interfaces.

Angular is based on a MVC (Model-View-Controller) architectural model which basically divides the application in three different components:

- the model = captures the behavior of the application

- the view = displays an output of the application (such as a chart or a graph on the screen)

- the controller = accepts input and converts it into commands

The controller usually sends commands to the model to update its state or to the view to change its presentation, the model notifies its associated views and controllers when it was a change in the state and the view requests info from the model to update its presentation to the user.

So, in short, Angular works by reading the HTML page with its embedded custom tag attributes. These attributes are interpreted as directives instructing Angular to bind input and output parts of the page to a model that is described with standard Javascript variables.

AngularJS is designed to:

- decouple the UI from the Application's Logic
- decouple the client side of the application from its server side
- provide a structure to the sequential operations of designing UI, writing business logic, coding and testing
- reduce the difficulty of testing (by the way the code is structured)

Angular presents the programmer with very powerful directives that allow for re-usable custom HTML-type of elements. Here are some of these directives:

- ng-app = declares the root of an angular.js application
- ng-bind = sets the text of a DOM element to the value of an expression
- ng-model = establishes a two-way data binding between the view and the scope
- ng-view = handles JSON data before rendering templates
- ng-controller = specifies a JavaScript controller class that evaluates HTML expressions

Here is a version of a "Hello World!" type of application in AngularJS:

<script type="text/javascript"
     src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
----
<!DOCTYPE html><html ng-app><head>
  <title>Hello World in AngularJS</title>
  <script type="text/javascript"
   src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script> </head><body>
     Textbox:
    <input type="text" ng-model="mytext" />
    <h1>Hello {{ mytext }}</h1>
</body>
</html>

The ng-app attribute basically tells Angular to be active in this part of the page. The ng-model attribute binds the state of the textbox with the value of the model (which is mytext). In a two-ways binding way, when mytext value changes Angular automatically changes the model with this value. And if we change the model's value Angular will change the value of mytext.

In conclusion, AngularJS presents the following advantages and opportunities in comparison with traditional JavaScript/jQuery programming:

- enables the programmers to create software quicker and with less effort
- delivers code that is easier to maintain and expand
- improves testing experience
- encourages good programming practices
- allows for easier, smoother collaboration with your team

Examples of applications where AngularJS is a great choice are:

- single or multiple pages web applications / front ends prone to future expansion
- complex, data intense applications
- web applications where the front-end developers do not have access to the back-end
- detailed, "grid-type" front-end applications such as financial applications or applications for accounting firms
- any other kind of application where html rendering in the browser makes sense

Examples of applications where AngularJS would not be the best choice are:

- highly computational / mathematical applications
- games

Make it a great day!

Adrian Corbuleanu
Miami Beach, FL
http://wittywebnow.com

Notes: to document for this article I used the following online resources.

1. http://wikipedia.com
2. https://angularjs.org
3. http://viralpatel.net
4. http://jeremyzerr.com

Monday, December 8, 2014

Node.js

Node.js is an open source runtime environment / platform that allows advanced programmers to build scalable, high-performance network applications.

Since lately there is a lot of node.js buzz in the Miami start-ups community, I decided to write this blog & explain the technology in a little more details. This blog does not want to be a comprehensive a node.js manual but it will give new developers and business community an idea about this relatively new technology.

Node.js gets implemented server side (i.e. on a Linux machine), it's based on javascript and it uses an event-driven, non-blocking I/O model which is very good for data intensive real time applications.

Node.js was created by an individual by the name of Ryan Dahl in 2009. It is currently gaining popularity and it is used by some large companies like Microsoft, Yahoo, Walmart, Groupon and Paypal.

The story says that Dahl was inspired after looking at a large file upload progress bar on Flickr. The browser could not assess what percentage of the file was uploaded and it had to query the server to retrieve that information.

Node.js can keep many connections alive without having to reject the new incoming connections. It can be compiled on the linux server and, many of these enhanced packages/libraries, it can also be downloaded as a pre-compiled library/binary. Combined with a  document database (such as MongoDB) node.js offers a unified javascript development stack.

Here are a little more details about the philosophy of non-blocking code:

Blocking code looks like this (in some form of pseudo code):

Read file from Filesystem {
Store content
Print content
}
Do something else

Non-blocking code looks like this (in some form of pseudo code):

Read file from Filesystem {
Whenever you complete, print content
}
Do something else

While apparently there is not much of a difference between these two different ways of serving things, if you sit down and draw time diagrams of these calls you will notice significant differences in performance.

Let's say we have 2 calls: one that takes 7 seconds, the other one takes 3 seconds.

When you run these two different calls in a blocking manner they will be sequentially served and the total time to process them will be 10s. When you run the same two calls in a non-blocking manner they will be served in parallel and the total time to process them will be 7s resulting in a 30% improvement in performance. The more concurrent calls you have, the more you will improve.

Syntax wise, on a standard linux machine:

Blocking

var content = fs.readFileSync('/path/to_filename');
console.log (content);
console.log ('Keep going');

Non-blocking

fs.readFile ('/path/to_filename', function (content, err)) {
console.log(content);
}
console.log ('Keep going');

Please notice the difference in the names of the system functions, readFile for non-blocking (or async) vs. readFileSync for blocking.

This example is just illustrating the concept on reading a file but similar code constructions can be built to consume web services, start/stop web servers, refresh web pages in real time etc. With node.js the events treated in the loop are always asynchronous. Typical blocking operations such as calls to web services / apis, reads / writes from / to databases or calls to extensions can now be accelerated.

Here are some types of applications you can build using node.js:

(1) Chat servers
(2) Social media networks
(3) Fast files upload solutions
(4) Ad servers
(5) High volumes e-commerce sites
(6) Collaboration tools
(7) Mobile apps that talk to a db via an API

Here are some types of applications where node.js is not the best fit for:

(1) CPU intense applications / algorithmic applications [i.e. it won't be the best idea to write a chess game in node.js]

Make it a great day!

Adrian Corbuleanu
Miami Beach, FL
http://wittywebnow.com

To document for this article I used the following online resources:

1. http://nodejs.org
2. http://codeschool.com (node.js for dummies)
3. http://stackoverflow.com
4. http://wikipedia.com

Monday, December 1, 2014

5 business mobile apps we use every day

There are thousands of new consumer apps coming out every day. People use them to communicate, navigate, get on social media, take pictures, figure out their way around in Disney Parks, play games, listen to music, watch videos etc.

But how about business apps? Everybody is using their favorite e-mail application, calendar, browser and text utility. What are some of the more specialized apps though? They can fuel your business growth.

Here are five classes of business apps we use on a daily basis. We actually use many more business apps than just these five including some of our business apps but I am writing this for a larger audience.

1. LinkedIn

The mobile app of LinkedIn is an awesome app to keep in touch with, grow and involve your professional network. I use both the Android and the iPhone versions- they are both free of charges. I add new contacts, respond to messages, post updates, check out profiles, get business referrals etc. Weather I am attending a conference, workshop or client meeting all of these operations work beautifully on the go without booting up my laptop.

2. Meetup and Eventbrite

These are events management apps distributed by their respective Organizations. I am big with local events and tech meetings and I usually schedule my participation two weeks ahead. Meetup in particular is great because it gives you the opportunity to participate in online mobile discussions and interactions right around a certain event is scheduled- which is a great opportunity to have your message communicated and involve users who will participate in the meeting. And of course you have all the standard features like calendars of upcoming events, addresses, phone numbers, mobile sign-ups, integration with Maps / driving directions etc.

3. Fidelity

I've been using this app for about a year now migrating from my older desktop version. It basically allows you to manage your stock market investments with real time quotes. Even if I am not by any means a day trader or a short term investor- I actually prefer long term positions- I always get market quotes on my favorite stocks such as BABA, GOOG, FB, TSLA, AAPL and TWTR.

4. Skype and Google Hangouts

These are good quality mobile communication apps. Without being perfect quality and SLAs wise, they are very decent free tools to have long distance video and conference calls, share work and message with teams involved in projects. I've been using their desktop versions for years and I had been recently migrated with great results to the mobile versions. I can now hold an operational / progress update meetings (i.e. meetings during breaks of business presentations) without being held hostage at my desk- which gives me a push in productivity and velocity,

5. Google calendar

The old Google calendar still makes the list. It is particularly useful as it integrates nicely with the desktop version (it's actually a cloud hosted calendar which can be managed from any kind of device). It is a tremendous help for me as I get reminders on scheduled meetings, phone # / bridges, addresses, contacts etc. It also integrated nicely with Google Maps for driving directions on the go.

Make it a great day!

Adrian Corbuleanu
Miami Beach, FL
http://wittywebnow.com

Wednesday, November 19, 2014

10 business meetings to attend in Miami and Ft. Lauderdale areas

Thanksgiving is right around the corner and we are way into Q4. We had two very fast paced Q3 and Q4 with quite a few full stack solutions delivered and new long term contract opportunities built up.

We do a lot of our current business development by actively participating in local tech community events, meetings, conferences and gatherings. It is a great way to meet new companies with technology initiatives.

There are literally hundreds of meetings going on in town as we speak and over the last 3 month I have attended close to a hundred different events, however based on my personal experience there is a handful of meetings where you can actually get business traction if you are an aspiring entrepreneur in South Florida.

I will briefly discuss 10 of these meetings down here and I will follow up with some more details in a separate blog. As we are working on setting up some of our own events, I will keep everybody in the loop with the developments.

1. Refresh Miami
https://www.refreshmiami.com/

Cost: $10
Takes place: monthly
Average attendance: 50-70 persons

This is a great event with participation of a large pool of companies and individuals. Start-ups that attend are often offered on stage pitching opportunities and funds raising relationships / vehicles. The ones that are in the crowd are many times pre-funded and are looking to develop new relationships to grow their businesses. Our company secured serious average term software development contracts out of this event.

2. Micro Venture Capital Club
http://www.meetup.com/microvc/

Cost: $10
Takes place: monthly
Average attendance: 25-30 persons

This is monthly meeting with the mission of putting together entrepreneurs and investors. Two or three pre-qualified companies are offered the opportunity to pitch during every event. Investors and members of the audience can ask questions and bounce ideas / make recommendations. There is a solid flow of tech companies that present and many other in the audience. The investors are both individual investors (angel type) and institutional.

3. Network After Work
http://www.eventbrite.com/e/network-after-work-miami-at-the-viceroy-hotel-tickets-13370679061?aff=eac2

Cost: $10
Takes place: monthly
Average attendance: 70-100 persons

This is a very intense event that gathers a large local crowd. Both Enterprise, mid-size firms and start-ups are represented. The event is organized in a Happy Hour type of manner in different restaurants and bars around town (generally around Downtown Miami / Brickell). There are real companies with real budgets and with medium term needs for technology. We got good clients out of this meeting and a few promising partnerships with companies that provide complimentary services.

4. South Florida Agile Group
http://www.meetup.com/South-Florida-Agile-Association

Cost: free
Takes place: monthly
Average attendance: 25-30 persons

This is a very good quality meeting that promotes agile software development practices. The audience is composed mainly from Project Managers from different local Corporations such as Citrix, Office Depot, Subway, KRFS etc. While this is not directly a meeting where people discuss business development initiatives, it is a great place to meet Corporate decision makers and establish relationships. We have closed software developers placement business in this meeting.

5. IACMP
(website not available)

Cost: free
Takes place: monthly
Average attendance: 20-25 persons

There are few people in town who are familiar with this "secret" meeting. They call themselves the International Association of Certified Microsoft Partners. There are pretty good size small business represented (i.e. 50+ employees) and Corporate Vendors (mainly Telcos). The meeting is focused more on Managed IT Services such as bandwidth, telephony, hosting, hardware and OS level support etc. The culture of the event is very much around building relationships to grow your business.

6. Greater Miami Chamber of Commerce
https://www.miamichamber.com/

Cost: $800 for a basic annual membership (price per meeting varies)
Takes place: weekly
Average attendance: varies (200+ persons for a Trustee Luncheon Event and 40+ persons for regular weekly meetings around town)

This Chamber meeting is a good fit for established companies looking to expand into new verticals / markets. It is fairly pricey to attend if you are a small shop and fairly hard to get visibility without a significant membership level (such as a Trustee Level at $3,000) as some of the events where there are decision makers are exclusive to these higher levels of membership. However it is a good place to be in as it elevates your credibility as a business. A lot of traditional businesses are represented such as construction companies, accounting firms, lawyers, real estate agents, non-profits etc.

7. Tech Cocktail
http://tech.co/city/miami

Cost: $10/event
Takes place: monthly
Attendance: 50+ persons

Great meeting with solid participation and energy. The meeting is another Happy Hours type of event. The Organizers offers two drinks in the price of the ticket to attract a larger crowd. It is a good event to establish relationships with Corporate Managers and Staff Employees, some mid size firms (i.e. 200-400 employees) and a lot of start-ups. Start-ups do pitch and can rent tables and purchase display ads. Start-ups at this event are in immediate need (and some of them have the financial means) of developing technology. We got a few small size clients at this event.

8. Waffle Wed at Live Ninja
http://www.eventbrite.com/e/waffle-wednesday-with-liveninja-tickets-14275826381?aff=eac2

Cost: free
Takes place: weekly
Attendance: 25+ persons

This is a fun local meeting run by a company called Live Ninja. The company developed a video streaming product that can be used to deliver remote training sessions and coaching sessions and are now working on positioning the product and grow their business. The meeting is informal and has an entrepreneurial spirit. The owners of the company make waffles in front of the audience. They usually gather a similar steady crowd- which is mainly start-ups. We had closed start-up business in this meeting (based on some leads we developed in other meetings). We also found a good sales / business development person with Corporate experience who we recruited.

9. Front End Developers
http://www.meetup.com/Front-end-Developers-of-Miami/

Cost: free
Takes place: monthly
Attendance: 40-50 persons

This is a quite surprising event organized by an individual by the name of Ernie Hsiung (he is a front end developer at Rackspace). The meeting has no fuss and it is educational / informative. But Ernie's events gather an impressive pool of real companies with real software development budgets and immediate software development needs. Over the last three month we acquired three different clients out of this meeting: a financial company from Brickell, a mid size software development shop in North Miami Beach and a Marketing Company with ties to South America.

10. CTO Summit
http://theinnovationenterprise.com/summits/CTO-Summit

Cost: $1,600
Takes place: annually
Attendance: 50+ persons

This is an Enterprise Level event that caters to a Senior Managers and Executices audience: mainly VPs, CTO or Directors of Staff. Companies like Miami Dolphins, Wallmart, Seagate, Automatic etc. are represented. The speakers focus mainly on their current initiatives at work but also on certain market trends such as big data, security, scalability, compliance etc. There are some smaller companies represented in the audience as well. It is a good opportunity to meet local and national decision makers and to try to get a foot in the door as an independent software development company. Participation in the event is pricey for your average shop as the Corporations pay for their employees to attend.  But they rarely fill out all the allocated seats and you can show up the same morning and get in for free (or try to get a referral from one of the recruiting companies that participate).

And here is a bonus conference for you guys: The Web Congress. It is an annual conference with a great participation. Both start-ups and Enterprise entities are represented. There are usually two days of events: a day with stage type of presentations and another day with workshops. Last time I attended companies like Facebook, Sony Entertainment and Twitter delivered presentations and the total crowd was in the range of 150+ people.

Make it a great day!

Adrian
Miami Beach
11/19/2014
http://wittywebnow.com

Saturday, November 8, 2014

Testing your iOS apps with Testflight

When you need to release iOS code fast, especially to new customers with unregistered iPhones, it is a good idea to use one of these over the air testing platforms such as TestFlight or HockeyApp.

One of the issues with writing native code is that your customers will need an Apple Developer account to test out your code. Applying for an account takes about 1 week and it costs about $100. Some customers are not willing to wait for that and are keen to see their work progress in action soon.

With just the udid of the tester's phone and a few simple registration steps, TestFlight.com will allow for your build to be tested out right away.

And it gets even better: using TestFlight is free of charges!

The way the app testing process works is very simple: as a developer you basically create your team, get their phones udids, provison their profiles, build the app for those udids then distribute the .ipa through TestFlight for testing. As a tester all you have to do is to join the team created by your developer, connect your device and then, when the build is ready, to follow the e-mailed links for app installation.

Here are a little more details about how this process works:

http://help.testflightapp.com/customer/portal/articles/829537-how-does-it-work-

TestFlight also provides an SDK to be integrated for more advanced reports such as sessions (which essentially tell the developers how the testers are using their app), crash reports, in-app updates, in-app feed-back etc.

Please find more details about TestFlight's SDK here:

https://testflightapp.com/sdk

I totally recommend TestFlight to all the iOS app developers who are under time constraints for deliverables and to all the agile teams out there.

Make it a great day!

Adrian Corbuleanu
Miami Beach, FL
http://wittywebnow.com

Sunday, October 5, 2014

Talking to an Android developer

This week we talked to Ivan. He is an experienced Android developer with lots of Java code under his belt and a few Enterprise solutions releases.

How do you design and test your Android app across multiple devices, i.e. different screen resolutions?

I use dp units on draw-able resources for 6 screens types ( ldpi, hdpi, mdpi, xhdpi, xxhdpi, xxxhdpi). Plus I am using the different layouts for landscape and portrait orientation. For more information please take a look at this guidelines:

http://developer.android.com/guide/practices/screens_support.html

What is your experience with deploying native Android apps on a variety of platforms with different levels of resources available? (i.e. memory, storage) Give an example of a situation you had and how you addressed it.

For example for storage :
if(Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {
       return new File(context.getExternalFilesDir(null),  getCurrentDate()  +".jpg");
    } else {
        return new File(context.getFilesDir(), getCurrentDate()  +".jpg");
     }

so different methods for the external storage access in different versions.

I know you also have experience with the following frame works: Titanium and PhoneGap. What is your opinion on them vs. writing native code?

PhoneGap is displaying the app in the WebView, so the app perfomance can be relatively slow, comparing to a native app. Here is a link to PhoneGap's website:

http://phonegap.com

Titanium is better, it gives you the ability to code with JavaScript. But sometimes you may have trouble with access to device sensors can. Here is a link to Titanium's website:

http://www.appcelerator.com/titanium/

So if you want the best performance, responsiveness and broad abilities working with device sensors, I recommend writing native code.

Make it a great day!

Adrian Corbuleanu
Miami Beach, FL
http://wittywebnow.com