We Are Now A ‘Certified Minority Owned Business Enterprise’!


New MMSDC Logo.png

At Cogent Integrated Business Solutions Inc., we’ve always been proud about being a minority owned enterprise, and about showcasing our diversity wherever we go. After being in business for more than 10 years, we are very excited to share the news that Cogent has been certified as a Minority Owned Business Enterprise (MBE) by MMSDC, as of December 2016.

This certification definitely encourages us to expand our efforts in sharing our diversity, by establishing ourselves as partners with organizations committed to working with businesses like us, in order to benefit from our services. This certification also supports our efforts to expand employment opportunities and job security, to other minorities as well.

As an IT services provider, offering consultative and results-driven solutions in SAP technologies, as well as providing employee productivity/ engagement and smart enterprise mobility products; getting this certification is an accomplishment for Cogent. We hope to enter, expand and deliver our technological offerings to the city and state governments, and educational institutions. We are very confident that the public and not-for-profit organizations will benefit tremendously through our capabilities.

Affiliation with MMSDC is surely a great start for Cogent as this allows hundreds of corporations access us through the council. Also, in conjunction with this certification; Cogent has already initiated the process to get certified with Michigan’s HUB program, by becoming a member of the Small Business Association. These certifications will not only open doors for us to enter the public domain; but, as an established  SAP consulting and mobile product development company, we can now successfully deliver our solutions and services to a variety of clients and industries across Michigan, and continue to ensure we deliver the highest levels of service that will benefit the community as a whole.

On behalf of the Cogent team, here is a shout out to all the organizations out there open to collaborating with us, that, ‘we guarantee we will make you feel as happy, satisfied, and proud working with us; just like we feel about our products and services!’

How do I learn iOS Programming? (Part I)

By Peng Xie

I’ve been involved in iOS development since late 2011. Watching and being part of the rapidly growing app development industry has always been a fascinating thing to me. In this three-part series of blog post, I’ll share with you the way I learn iOS development and some of the habits I developed over the years of iOS development. In the first part of the blog post, I’ll talk about how to get started and some of the resources that have helped me in learning iOS development.

There’re many ways one can find the motivation of starting iOS development. It may be a will to learn something new, a good idea you want to turn into a good app, or you need some features on your phone or computer and you just can’t find any app that meets your demands. For me, it was a project that requires me to complete an unfinished PhoneGap app. Since I knew nothing about mobile app development and the only requirement for the project is to finish it, I went ahead and started to learn iOS development. I personally find it easier to actually learn a programming language with a real project. It doesn’t have to be something big or innovative as long as you have a plan. Most important, you have to stick with your plan and finish the project. I feel completing the project is the key to learn and progress, and in addition, you will have something to play with or show off to your friends when the project is finished.

Learn in Classrooms

I suppose one of the best place to learn stuff is in classroom. But unfortunately I didn’t have the time to take the mobile app development course when I was in college. Instead, I turned to the Internet and started to learn iOS development on iTunes U. There are many useful courses out there on iTunes U and particularly the iPad and iPhone App Development Course from Stanford was the one that helped me to get started. Although I know some people think the course is not really beginner friendly, I still find it helpful and a good course to get a feeling of mobile app development. It is always good to take an actual class but don’t limit yourselves to only physical classrooms. With the Internet, anywhere can be a classroom.

Utilize Tutorials

Developers on the Internet are awesome. They make wonderful frameworks and libraries for us to use and they also make great tutorials for us to learn from. As the old saying goes, Google is your friend. Use Google to discover awesome tutorials that can help you. However, I would suggest to skip Apple’s official tutorials for now and come back later because I found them a little bit more difficult to understand and less detailed. Keep in mind that the tutorials from Apple are still helpful. We will come bacAs beginners, we should look for detailed and preferably step-by-step tutorials. I personally am a big fan of Ray Wenderlich’s tutorial website. They have several teams to make sure their tutorials are high quality and up to date and they cover topics from iOS development 101 all the way to complicated stuff like Open-GL programming.

Another website I find useful is Ry’s Objective-C Tutorial. It’s not a step by step guide but rather an easy-to-understand guide on the Objective-C language. It helped me to understand the basics of Objective-C and reading it from time to time helps me to strengthen my foundation of Objective-C language.

One last thing about utilizing tutorials is the way how we use them. Different people have different styles of following tutorials. For me, I always treat tutorials as if they were real projects. I write the codes with the instructions of tutorials and apply my coding standard to it. I suggest to avoid copying and pasting any code from the tutorial because every time I copied and pasted chunks of codes from tutorials I ended up learning nothing and had to restart the whole tutorial.

Read Documents

I always consider myself as a student and as a student I have to do my readings. In our case as students of iOS development, we have to read documents for SDKs, frameworks, libraries, etc. Study and apply coding style guidelines from Apple and companies such as Google and NYTimes will help us to streamline our coding habits and make the lives easier for “future us” when we come back to our old projects. We all have been in the situations where we look at our codes and wonder if they were actually written by ourselves, aren’t we?

Documents for SDKs, frameworks and libraries are of course equally important and helpful. Now it’s a good time to check out Apple’s official tutorials since we already have a basic understand of what’s going on with iOS development. They (especially the new ones) are great when reading with Apple’s documents. Blogs such as NSHipster can also help us to better understand documents and discover interesting topics that will potentially be useful in the future.

What’s Next?

I think by now we should somehow have an idea of how to get started on iOS development. Feel free to leave a comment to let us know if the blog post is helpful or tell us your story of learning mobile app development. In the next part, I will share with you one habit that has benefited me a lot during my study of iOS development. Remember to check back and happy learning!

(To be continued…)

 

A Brief Overview of Android Fragments

By Sean Kollipara

Introduction: Activities

When learning to develop for the Android platform, one of the first components of the Android SDK that you will encounter is the Activity object.  An activity is the basic component that provides UI and functionality in an Android app.  It has a lifecycle and callbacks associated with the lifecycle events, and is contained within its own window.  Multiple activities are usually present in a single application.

For example, consider Cogent’s directory app, mPower mD.  When launching mD, the first thing you see is the login screen.  It is its own activity.  Upon successful login, the login activity closes, and the home activity appears.  The home activity contains tabs that enable the user to navigate through the app content.  This is the basic gist of an activity.

Meet Fragments

Android 3.0 introduced the concept of a fragment.  A fragment can be thought of as a reusable piece of an activity.  It can have either or both of its own UI and functionality.  Like an activity, a fragment has its own lifecycle and set of callbacks to response to its lifecycle events.  Creating a fragment is easy: make a new class that extends the Fragment class.

public class MyFragment extends Fragment {

 …

}

Fragment Lifecycle Callbacks

When creating your own fragment, there are a couple of lifecycle callbacks you’ll want to define at minimum.  The first is onCreate().  It is just like the method of the same name in an activity.  It takes a bundle parameter and you use it to perform initialization activities, such as a call to the superclass.

@Override

public void onCreate(Bundle savedInstanceState) {

  super.onCreate(savedInstanceState);

  …

}

Unlike an activity, a fragment does not have a setContentView() method.  Instead, it has a lifecycle callback named onCreateView().  This is the other callback that you’ll probably want to define.  This callback is used to inflate a view and perform other operations on it as necessary.  For example, you might want to assign some of the UI elements as members of the class if you need to perform operations on them during the fragment’s lifecycle.

class MyFragment extends Fragment {

  public Button mButton;

 @Override

     public void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);

    …

  }

  @Override

  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

    View myView = inflater.inflate(R.layout.myview, container, false);

    mButton = (Button) v.findViewById(R.id.mybutton);

    return myView;

  }

}

Other lifecycle callbacks for fragments include onAttach(), onActivityCreated(), onStart(), onResume(), onPause(), onStop(), onDestroyView(), onDestroy(), and onDetach().  As you can see, many of these are similar to the lifecycle callbacks for an activity, though a few are specific to fragments only.

Why use fragments instead of activities?

Fragments are an ideal solution when you need reusable pieces of UI and function that go together.  For instance, you might have an app where the phone layout has the main content in the entire screen and the menu in a navigation drawer.  But, in order to make use of increased screen real estate, your tablet layout has the content on the screen with the menu as a sidebar on the left.  The menu, with its UI and own functionality, is a reusable component that can be utilized in both layouts.  The same is true for the content.  Thus, it is sensible to put each of these two pieces in its own fragment.

Why not create and swap views or view groups instead?

This is a good question because it suggests a viable alternative to using fragments.  The main reason you would pick fragments over views and view groups is because they have a lifecycle and a backstack.  If either of these features are needed, it is advisable to use the fragment.  Otherwise, you’d have to roll your own lifecycle or backstack, and that would end up being a project in and of itself.  So the best course of action would be to use a fragment.

Special Types of Fragments

There are a few special types of fragments available for common UI paradigms.  In mobile apps, there are often master-detail design flows, where the master component is a list.  For this purpose, the Android SDK provides a special type of fragment called a ListFragment.  It inherits from Fragment and contains a ListView with the ID @android:id/list.  It can also be subclassed and customized to your liking, provided that the view contains a ListView element with the aforementioned ID.  For more information, see the Android development documentation for ListFragment.

Another special type of fragment is the PreferenceFragment.  This replaces the deprecated PreferenceActivity with a fragment that is wrapped by a FragmentActivity.  The PreferenceFragment can be used in a manner just like the PreferenceActivity in order to load an XML definition of preferences into the UI so that the user can customize the app to their liking.

The Fragment Manager and Fragment Transactions

Android contains a special Activity called a FragmentActivity, which includes an object called a FragmentManager.  The fragment manager allows the developer to manage the fragments that appear in each of the fragment containers defined in a view.  The fragments are loaded, switched, and removed through the use of transactions.

Within the FragmentActivity, you can start a FragmentTransaction by grabbing the fragment manager and calling the beginTransaction() method:

FragmentTransaction txn = getFragmentManager().beginTransaction();

Note: if you are using ActionBarSherlock, you should use getSupportFragmentManager() instead.

Once you have a handle for a fragment transaction, you can call various functions to add, switch, hide, show, and remove fragments:

Fragment myFragment = new MyFragment();

Fragment myOtherFragment = new MyOtherFragment();

txn.add(R.id.my_fragment_container, myFragment, “my_fragment”);

txn.replace(R.id.my_fragment_container, myOtherFragment);

txn.remove(myFragment);

Finally, to complete the transaction, call the commit() method:

txn.commit();

For a full rundown of the available methods in the fragment manager, see the FragmentTransaction documentation on the Android developer website.

Conclusion

Fragments are a bit confusing at first, but with some time spent researching and playing with code, it becomes easy to understand how they work.  Once you begin to incorporate them into your app, you can see the benefits of performance and reusability that they can bring to your Android app development.  For those who are new to fragments, I hope this post has helped to introduce you to the concept and provide a basic level of understanding as to their function and benefit.  Feel free to leave comments, suggestions, and questions in the comments section.

Happy coding!