Ademar

Ademar / October 14, 2014

Angular JS Redirecting to another page

I needed a way to redirect to another page inside an AngularJS controller, specifically after successfully submitting a form to the server.

There are lots of ways to do this, one way is to call window.location, however I wanted a more “angular” way of doing it.

Good thing I found out about $loc...

Ademar

Ademar / August 17, 2013

Decorators for Views in Rails

What are Decorators? Decorators help extract view-specific business logic from models into decorator class. Here is an example code that puts view-specific business logic in the model:

app/models/user.rb

class User
  include Mongoid::Document

  def is_top_twenty?
    User.desc(:points).limit(20).include? self
  end
end

app/controllers/profiles_controllers.rb

c...

Ademar

Ademar / August 15, 2013

Thinner Models with PORO

The Rails convention is to put your business logic should be on the models. Here’s a typical example:

app/controllers/users_controller.rb

class UsersController < ApplicationController
  def suspend
    @user = User.where(user_id: params[:id]).first
    @user.suspend!
    redirect_to @users, notice: 'Successfully suspended user!'
  end
end

app/controllers/user.rb


      

Ademar

Ademar / July 15, 2013

ETags in Rails 4

What are ETags?

ETag or entity tag is part of HTTP that is assigned by a web server to a specific version of a resource found at URL. In other words, ETAG is a key we use to determine whether a page has changed.

ETags in Action

Here’s a diagram on how etags works:

Here’s a breakdown of how ETags works in Rails:

First Request 

1. Render the entire re...

Ademar

Ademar / November 25, 2012

Y4iT comes to Cebu

Last November 22 - 23, 2012 the biggest IT event in the Philippines comes to Cebu. The Philippine Youth Congress on Information Technology or commonly called as Y4iT (Youth for IT) is an annual event hosted by UP Information Technology Development Center (UPITDC) that provides a venue to experience activities and hear talks about IT and IT-related topics from various speakers in the different fields in IT to hone the global competence of IT practitioners.

Together with CeBuin...

Ademar

Ademar / November 08, 2012

GDG DevFest Cebu 2012

Google Developer Group (GDG) Cebu had its very first GDG DevFest in Cebu last November 7, 2012 at Quest Hotel. A lot of participants from the academe, industry, startups who are eager to know more about Google Technologies joined the event. We’re happy that we were invited by Mr. Jerome Locson to be part of the panel for Let’s Startup. Thanks Jerome!

Ms. Pauline Wade of CeBuinIT, Mr. Dave Overton representing Techtalks.ph for SW...

Ademar

Ademar / October 04, 2012

Codetoki's First Applicant

So Hack2Hatch is finally happening tomorrow. You can see all the media buzz, the hashtags and the facebook shares flying on the internet. It is certainly a big event, all the successful Filipino technopreneurs are coming back to help mentor local aspiring technopreneurs.

From all the chaos of working on our client projects and requirements we had to pass for Hack2Hatch, we silently deployed the new version of codetoki.com yesterday. 

Ademar

Ademar / October 04, 2012

hack2Hatch Learnings

One way to improve our startup community is to share the learnings. We’re happy because we’re given a chance to share our learnings from Hack2Hatch to a group of startups headed by Markjeee, Dave and Tins.

Ademar shared what Codetoki learned from h2H.

Hack2hatch Learnings Summary 

The main point we highlighted was how important the business plan is. We’re not referring to the traditional business plan. ...

Ademar

Ademar / September 08, 2012

hack2Hatch

In 1950’s, the Philippines was predicted to be one of the tiger economies in Asia. Sadly, we missed the opportunity to deliver. Today, Bloomberg predicts that in 2050 the Philippines will be a Tiger economy. Let us not miss it this time.

In the tech scene, successful Pinoy technopreneurs from abroad like Dado Banatao, Winston Damarillo and Sheila Lirio Marcelo are trying to mimic the Silicon Valley environment, helping the Filipinos through mentorship and possibly funding the...

Ademar

Ademar / July 20, 2012

PSIA Invitation

Last June 14, 2012, we were invited to present Codetoki idea and share our experience in participating startup competitions to PSIA (Philippine Software Industry Association) members of PD/SIG (Product Development and Special Interest Group). The meeting was held at the Asian Institute of Management in Makati.

The first speaker was Ms. Maoi Arroyo, Founder and CEO of Hybridigm Consulting Inc., the Philippines’ first Bio-tech consulting firm. She talked about the aspects of co...