Reusability Is the Name of the Game

Building a large scale iOS application from scratch without any plan in place may have you end up with creating a complex application tied with an unwieldy overtime. Some developers are fortunate enough to find their answers online on sites like Stack Overflow and Hacking with Swift, etc. However, if the app is aimed at being multi-featured, there are only a handful of other apps that can be compared to your use case in terms of scale. The size of such a project file alone takes its toll on your machine, not to mention the build time and overall workload.

So, what’s the solution to this predicament? This is where you need to work smart. Don’t develop unnecessary components! When it comes to auxiliary components like a modal that can be used to add images or notes, a drop-down menu providing the user with various actions, a pop-up with a collection of options out of which you can have multiple selections or other similar components – it’s better to make them reusable. Multiple features of your application will use them so treat them as such by making them generic without any concern for a specific feature’s visual model. Here are a few examples depicting the use of such generic reusable components in example applications:

[rev_slider alias=”reusability-1″][/rev_slider]

Reusability in itself is a broad term and may mean something entirely different to different developers. In this article, reusability refers to a concept in application development in which, where possible, you design components that are reusable and customizable, thereby, future-proofing your code.

In order to make a reusable component whose bare-bones structure may be used across multiple apps as well as across multiple features within a single app, you have to map out and design the structure of your component before starting the actual implementation in such a way that if in the future, the need arises, you can customize the component further and add more options depending upon the particular use case.

Let’s take a look at an example of an app in which the user can upload the pre and post images of their room transformation. For this, a custom UIView called AttachmentsListView has been created. This can be used as a component in any controller. In this example app, AttachmentsListView is used in the following two ways:

[rev_slider alias=”reusability-“][/rev_slider]

  1. Pre-transformation
    • Workflow: Clicking on the Add Image button opens up a pop-up modal. The user is required to upload images from the modal.
    • Implementation: For this purpose AttachmentsListView is embedded within this modal. To communicate between the modal and then calling the view controller, a delegate can be used.
  2. Post-transformation
    • Workflow: Clicking on Add Attachment opens up a context-menu to choose from the relevant option.
    • Implementation: The custom view has been embedded in the screen so the user can directly add images or other files.

You might have observed that the scope of attachments has been extended from just allowing the images to be uploaded in pre-transformation section to allowing the user to upload all kinds of attachments such as DOCX, PDF, etc. for post-transformation. This is where the concept of reusability comes into play. All you have to do is add just another AttachmentsListView to allow uploading these files. And for this particular option, you can replace the text of the button from Add Image to Add Attachment by adding a simple check of supportedTypes.contains(.file)

For the context menu, AttachmentsListView contains a UICollectionView section. This collection view further contains two different types of cells:

  1. One that contains a button which opens up a context menu with available upload options for the user to choose from. This can either be:
    • Open camera
    • Choose from Gallery
    • Choose from Files
  2. The other which represents a thumbnail of the attachment

[gist id=”736ebd0d9a41576fe86b6960d9322a21″]

What we see above is the initialization of the function supportedTypes, and the values in this array are further specified in their relevant calling class.

[gist id=”789f3756df8321ce99c2d98b6552fd1e”]

In this example, the user can upload files only for the post-transformation section, hence reusing the context menu with various options as per the use case.

As the above example illustrates, the reusable component AttachmentsListView has been used in 3 similar yet slightly different ways in this one project. It’s not hard to imagine that another app may also need a view that allows users to upload images/files, so it can be reused there as well and can be further customized depending upon the particular use case. Want to dig into the code part? Click here to access the source files on GitHub.

While this solution may look pretty simple, but the fact is, it is important to be able to identify the basic structures that can be used over and over again. Doing so, will prevent the developers from entangling themselves in the web of endless possibilities of defining what components can go generic, and be specific in identifying these components. All major websites and apps across the world take advantage of this concept of reusability to save development time and effort and reduce redundancy in code as well. This not only ensures that their code is efficient but also decreases file sizes and build times overall by having premade components that can be reused throughout the app.

Read more

Xgrid’s First Collaborative Event With PWiC

31st December 2019 – Xgrid collaborated with Pakistan Women in Computing (PWiC) Islamabad Chapter to host a networking session on Full Stack Deep Dive, Building User Centric UIs. The purpose of this event was to facilitate meaningful networking with the pioneers of Full Stack and UI/UX world, provide a guided learning session on these domains and share the opportunities that lie within these horizons – which is also inline with PWiC’s vision to enable the community to connect, learn and grow together. It was attended by students, IT industry professionals, fresh graduates and representatives from academia.

The event kicked-off with PWiC’s introduction and the various milestones PWiC has achieved over the years with their presence across the world. The discussion on how UI/UX is a part and parcel of every modern application and the key differences between the two, was led by Waqas Khalil, Director MarCom & Design at Xgrid. Waqas also highlighted the key aspects of application design followed by real world examples from the industry champs and shared his insights regarding how UX first approach used within Xgrid has helped us excel in the frontend application development domain.

“Design is the central component of everything we do at Xgrid. Where UX is not just tied to application design (look and feel), it plays a key role in meeting user expectations while enhancing the experience and hence, cannot be decoupled from Full Stack”

Waqas Khalil – Director MarCom & Design

Later on, Abdulllah Khan, Director Core Engineering at Xgrid, took over the floor and provided his valuable insights on how to make intelligent decisions when choosing an application stack while working with various frameworks. He also shed light on development process used in-house by Xgrid and the effectiveness of the UX first approach in making the process more streamlined. The session concluded with a detailed walkthrough of one of the business-critical customer product developed at Xgrid. This demo was lead by Syeda Urooj Fatima, Full Stack Developer at Xgrid, where Urooj illustrated how the UI/UX and Full Stack development best practices shared by both the directors earlier, were incorporated at various levels of the product layers before packaging everything together.

[rev_slider alias=”pwic-post-slider”][/rev_slider]

This session was also attended by several remote attendees. The highlights for this event can be viewed by clicking here.

Pakistani Women in Computing (PWiC) is a global community of women in technology fields hailing from Pakistan and their global allies, with the aim of collaborating, growing, inspiring, celebrating, mentoring and creating opportunities for each other. PWiC’s community goals are to build a strong network of Pakistan female technologists and their allies across the globe to promote Pakistani women in tech, increase their global reach and visibility, to foster growth and retention in STEM fields for the Pakistani community.

Read more

Why & When to Go Serverless

Serverless Applications and Serverless Computing are some of the terms that you will come across frequently when trying to choose from  various options being offered by cloud service providers like Amazon Web Services (AWS) and Microsoft Azure (Azure). The term serverless accompanied with the word application could be confusing, as it is contradictory to the conventional methods of developing and deploying applications. In this blogpost, we will attempt to explain what serverless applications are and what exciting benefits they bring to the world of cloud technologies.

Serverless applications are built using the services provided by cloud service providers like AWS or Azure, without having the developer to worry about the underlying infrastructure. The core of serverless applications is made from cloud-native services such as AWS Lambda or Azure Functions, which offer Functions as a Service (FaaS). These services provide the ability to write event driven code functions in any of the supported languages. The functions are executed automatically when the associated events are triggered, creating an automated chain of events which can range from an API being called, uploading a file to the cloud or even invoking other serverless functions.

Serverless is the fastest-growing cloud service model right now, with an annual growth rate of 75%.

Source: RightScale’s 2018 State of the Cloud report.

One might wonder what benefits serverless applications provide or why are they getting so much traction these days. The answer to that question is in the pricing model of all of these services which is based on the philosophy that you only have to pay for what you use. Let’s consider Lambda as an example, the price of using Lambda is primarily based on how many times a function is triggered along with some other factors like the function execution time and the resources it utilizes. In contrast to non serverless services that are charged by the number of hours the service was up for.

If a business or developer runs an application on an instance or virtual machine hosted by a service that charges by the hour, they would essentially get charged for the total uptime of the instance, irrespective of whether there are any users using the application or not. If the same application is deployed using serverless services, it will be available all the time, but the account will only be charged whenever an end-user makes a request or uses the application.

Building applications through serverless architecture can be very effective for use cases where you want an application that is always up and available, but does not have continuous and constant incoming requests. The application can have a large number of incoming requests at certain times and then have large periods of stagnation with little activity. Other than that, asynchronous or event based tasks like CI/CD pipelines, multimedia processing, and scheduled batch jobs are well suited for  serverless model. A couple of other benefits tied to adopting the serverless computing approach are mentioned in the figure below:


While serverless applications are bundled with various benefits, it is important to understand their core limitations that are often tied to the type use-cases and application models. From the pricing model of serverless services, it is pretty obvious that if the incoming events are large in number you would get charged more based on every input trigger. Services like Lambda or FaaS have  limitations such as the amount of available RAM and accessible disk space  being fixed for a Lambda function. Hosted functions also suffer from an issue known as Cold Starts, which means that every time a function has been dormant for a while it will take more time to spin up on the next request and thus cause a slight performance penalty. This issue can be minimized by using a runtime which suffers less from the cold-start penalty like Python or Node.js. It can also be minimized by reducing the overall function size.

Cloud computing also brings some limitations for serverless applications like vendor lock-in, where the switching cost to a different vendor is pretty high. If you are building a serverless application, you are committing to a specific cloud service provider and building your application around their infrastructure making switching across-platforms very difficult.


With all things considered, serverless is an interesting and in many cases a beneficial approach to building applications on the cloud efficiently in an agile manner, without worrying about managing the underlying infrastructure. It provides additional choices to solution architects while designing application architectures with minimal cost implications for their organizations.

Read more

Highlights for the Year 2019!

It is Thanksgiving today and team Xgrid would like to take this opportunity to express gratitude to all our customers and partners across the globe, for their confidence and loyalty. We are committed to keep the standard high for our loyal customers and excited to help our new customers excel in their journey. We are also thankful to our diverse and talented team for helping us shape up to be the successful business that we are today!

As 2019 has almost come to an end, I would like to share that this year has been full of applaudable achievements at Xgrid, filled with awards, successful project deliverables and happy customers. It’s nice to look back at them now and be thankful for how far we’ve come – something we’re absolutely proud of!

An addition of 19% new customers in Xgrid’s customer base in 2019-2020 with a 50% retention rate

Source: Driving Innovation to Empower Customers Infographic 2019

Let’s have a quick look at what we have achieved in all three of our business verticals, together with our customers and partners:

Starting with the UI and Application Development, at Xgrid, we religiously follow the UI/UX philosophy of meeting the user requirements (to create Natural User Interfaces) by leveraging the power of a human friendly design created with the right blend of visual aesthetics. This has helped us in delivering branding solutions including interactive websites and customer portals complemented by a variation of animations and illustrations. We have also delivered a wide range of business critical technical softwares, visualization dashboards and complex network applications developed exclusively for all kinds of devices including desktop, tablets and mobile phones.

We lubricate the stories of our clients using strategies revolving around user experience best practices and desirable exploitation of images to generate noticeable illusion of their artifacts.

Request a portfolio demo to see how we can collaborate.

Successfully managed upto 108 project releases till date

Source: Driving Innovation to Empower Customers Infographic 2019

Xgrid has also delivered cloud migration services to a couple of organizations over the years to enable applications to derive benefits leveraging on the cloud. The end goal was to assist our customers with building a secure and scalable, well-architected application framework mounted on AWS to lower the expense of IT resources by improving productivity, operational resilience and manifesting the required business agility. With our subject-matter experts and AWS certified individuals we have served small and big enterprises from various business domains and market segments. A glimpse of these segments can be also seen in the pie chart.



Xgrid recognized as Best in ‘ICT Services’ Category at P@SHA ICT Awards Ceremony 2019

Source: Driving Innovation to Empower Customers Infographic 2019

With organizations now being aware of the business benefits of a sandbox environment, the demand for isolated testing environments has increased tremendously in the market. Xgrid was selected as a trusted service provider by one of the fortune 50 companies to deliver an on-demand, self-service simulation of their real world data center. The motive was to provide an isolated execution of a network environment that provides real time reflection of network behavior and an orchestrator to virtualize instances of the sandbox environment to accelerate the broad-based showcasing of their solution. The flexibility that came with it includes but is not limited to instant provisioning, hassle free deployment and 10x reduction in the sales cycle. Our eminent work on this project was also recognized at P@SHA ICT Awards Ceremony in which we bagged a gold in ICT Services Award across Pakistan, which helps Xgrid stand out in a highly competitive market.

All in all, 2019 has been a glorious year for Xgrid. Our highly trained and dedicated team of professionals bring an informed perspective to each challenge. We would like to take the opportunity to appreciate the Xgrid family for always maintaining high standards, for their persistence and their great sense of humor always lightening up the office environment. We aim to excel further by keeping the bar high and look forward to many such magnificent achievements in the upcoming years.

Read more

Xgrid Shines at P@SHA

Xgrid has a global reputation of always building innovative and intelligent solutions. From providing customers with fast, reliable and secure AWS migration services, to creating sales enablement tools coupled with user friendly and intuitive UIs, Xgrid has always delivered topnotch business solutions in all three of our domains. These efforts were reflected in the P@SHA Awards ceremony on 21st September 2019, in Lahore. P@sha Awards are hosted by the Pakistan Software Houses Association and are the biggest awards of the Pakistani IT industry with a far reaching global impact.

 

In this ceremony Xgrid won not one but two awards from amongst 350+ applicants! We were recognized as the best in ICT Services Solutions in Pakistan and were awarded the gold award. The second category we were awarded in is CSR. Xgrid was awarded the silver award, appreciating our vision of considering it our responsibility to give back to the society that made us.

Team Xgrid at P@SHA ICT Awards

The quality of our work and the skills of the team in all three of ourdomains have generally always spoke for themselves and being recognized for them on a national level only proves them further. Winning the gold in a technology related category like ICT Services, competing against some of the biggest names in the IT industry is a true testament to the capabilities of our team and the dedication we put into our work. Every aspect of the product from UI design to the use of cutting edge technologies to develop and host the product, was greatly admired by everyone.

This award was bagged by one of our major projects with a Fortune 50 company: an entire application suite consisting of three components, including a tailored networking sandbox solution which Xgrid created with easy to use interfaces using our UX first design approach and enhanced with effective data visualization. The suite was then further optimized by deploying it on the cloud to allow large scale deployment. We have been working on various phases of this application suite since the past three years which represents the trust that our customers put in us to provide them with the best tailored solutions.

Alongside work, we here at Xgrid believe in taking the initiative to better our environment and society. We ensure that our daily routine does not consist of all work and no play and for that we regularly organize a number of team activities and try to incorporate different CSR activities with them. These activities are environmental and philanthropic in nature because we believe in creating the change that we want to see in our society. 

We won the silver award in the CSR category for our cleanliness drive held at Mushkpuri. The Xgrid team cleaned the 4 kilometre trek to Mushkpuri and brought back almost ten 40 gallon bags of collected trash to be disposed off properly. 

Being recognized nationally for one’s work is undoubtedly a memorable moment and these awards for Xgrid are no different. It shows that our hard work and dedication are paying off. We look forward to going further in our tech domains and are motivated to work harder than ever to bring home more laurels in the upcoming years.

Read more

Introduction to Kubernetes

Call it Kubernetes, or K8s, its hype or rather say ‘growing hype’ is making this container management and orchestration platform picture as the next big thing. Good news for the newbies out there, you are not alone in learning this unicorn ride. 80% of the attendees in KubeCon 2017 were attending it the first time with most common concern being new to Kubernetes and finding the right direction to get started.

(more…)
Read more

Hello 2018!

It’s the 31st of January today and we are already a month into 2018! I wanted to kick off our blog this year with two things in mind: a quick reflection on 2017 and a comprehensive look at the technological trends we see taking off in 2018.

(more…)
Read more

Maintaining a Value Driven Culture: A Sneak Peek into our World

Established in 2012, Xgrid Inc. is a pioneer in virtual networking domain, incorporated in the US and registered in Pakistan. We have been performing operations with our unmatched expertise, delivering a wide range of intelligent and secure cloud infrastructure products. Based in Islamabad, we work with cutting edge technologies and have been engaged in providing simplified, secure and efficient products leveraging on evolving standards to meet business needs and accelerated growth.

(more…)
Read more

#WeAreXgrid

Integrating updated/new technologies with your product is essential to keep its heart beating. But, making use of the right tools with the right technologies at the right time is the way to go, this is what we do and what cuts us from the clutter. #WeAreXgrid

(more…)
Read more