How to add complex app features with just a few lines of code

TL;DR: find and bind the right components

Hey there! It’s the time for a new post. An interesting one, we hope.

As you know, at DlhSoft we are building Gantt charts and other user interface components for all of you, developers. But they are rarely user interface oriented only. Most often we provide complete libraries targeting different technologies and including complex business logic and other services as well.

So do other companies and even single developers, too. Open or closed source, for only one or for multiple platforms, being packaged as simple zips or directly available in specific stores, repos, or set up to be easily downloadable by miscellaneous package managers — these are not that much important. The truly important thing is that there are (too?) many published libraries and — in order for you to avoid reinventing the wheel and also to save tons of money by reusing components that other have already developed — you need to find the ones that you can easily integrate into your apps, while offering the best possible features to delight your customers/end users.

Easier said than done, though. We’re not here to lie, however. It will take some time to analyze the offer, and to decide on one or another package to use. You’ll certainly look at each individual offer’s details, including features, reviews, pricing models, and so on. But it’s still going to be difficult, anyway. And it will take you some time, yet hopefully way less than if you’d decide to implement everything yourself. (Depending also on your needs, of course.)

What we do ourselves to help customers decide is to offer free and full featured trial versions of all our libraries without any expiration period. All you will see are some nag screens, from time to time, which you can just dismiss — during your investigations — by pressing a button. We really believe more companies would follow us and offer infinite-days — not only 30-days — trials for their offers. So that customers can really take their time to thoroughly test everything and decide which tool they’d rather purchase, eventually.

Let’s go with an example.

What if you have to show the status — such as running (green), suspended (yellow), or closed (orange?) — for some processes or something, in a timeline? On a Web site?

You can decide to draw some bars yourself, right? It won’t take that much time. But consider this: your timeline needs to use different scales, depending on who looks at the report: developers need to see an hour-by-hour chart, while managers want to see the “full picture” of an entire year. Or maybe you have to display also some dependencies between items. Or group them somehow based on your custom organization or, interchangeable, by host device or even by other, fully custom, rules.

When you’ll run into our Web site you’ll find two Schedule chart choices that could be configured to display what you need: a server side (ASP .NET based) solution and a pure JavaScript based one. Depending on your existing infrastructure, you’d therefore decide to further look either into DlhSoft Gantt Chart Web Library or into Gantt Chart Hyper Library instead.

Let’s say you already use .NET on your server, so you decide to go with the former. But even then, you need to choose between the classic Web Forms implementation and an ASP .NET MVC approach — indeed, we provide extension types that you can easily bind into your MVC pages.

But for now, let’s go with the classic Web Forms version, and find out that there’s even a specific demo app where we can start from — the “Resource status” one under ScheduleChartView:

The sample code is straightforward: you simply need to create ScheduleChartItem and GanttChartItem objects with the correct property values (read from your custom database or retrieved through your internal API) are add them to the component instance’s Items collection, and boom! Your data is beautifully visualized in your Web page with no more than a few lines of code.

Moreover, if you’d want to show resources in some hierarchical groups (such as employees within their departments, rather than simple processes), like we said it could have been requested above, you just need to use some Indentation levels too, like you can see in this secondary Resource hierarchy sample app:

Or, if you want customizable scales for the chart header you can easily do it as shown in our Built-in scales demo or even the Shift scheduling sample also on our Web site:

Or, if you want to display dependencies between items, you… oh? It seems at this time the ScheduleChartView component for ASP .NET doesn’t support showing dependencies between Gantt chart items. Only GanttChartView component does. Or… ScheduleChartView for JavaScript. But we wanted ASP .NET integration. What can we do?

Well, all hope is not lost! We just need to look a bit deeper.

DlhSoft components are always designed with extensibility support. Even without a sample app to show you, you can find out in our component’s reference documentation that a property named InitializingClientCode allows you to provide custom JavaScript to the ASP .NET component that would run it when the control is initializing!

You can therefore initialize and show dependencies on the client side, regardless of the server side support. We’ve tested this snippet in “Main features” sample app (for ScheduleChartView, obviously), and it works like a charm:

ScheduleChartView.InitializingClientCode = @"
control.settings.areTaskDependenciesVisible = true;
control.scheduleChartItems[1].ganttChartItems[1].predecessors =
[{ item: control.scheduleChartItems[1].ganttChartItems[0] }];";

In conclusion, it’s not easy to decide which library you need, which component, what flavor/technology to start with, and whether or not it provides all the features you need and/or how much time it will take you to customize everything as your customers would want it.

But, in our humble opinion, you should simply do some homework before deciding “we’ll just implement [anything] ourselves”. Because it’s clear: it will really take you a lot (!) of time to develop everything that a public library may offer. Think how many weeks, if not months, you’d have to spend to display those dependencies between items grouped under expander items and having custom scales as chart headers.

Whenever you have custom needs, do your extensive search first. It’s possible that somebody has already had your exact — or a very similar — issue and put up a product on the Web, that you can try.

Assuming they offer a free trial, and even better if they offer a time unlimited one to ensure you can work at your own pace, you should create a list of features you need and compare it to the offer you find.

Ask, if you aren’t sure a feature is supported. (We, for example, also offer free, unlimited technical support, even before you purchase a product license.)

And eventually, you’ll know: which components to use, what version to rely on, what license to purchase to remain within budget, and so on.

So don’t worry, but do focus and: you will succeed. Good luck, everyone! And for now, good bye.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
DlhSoft

DlhSoft

Passionate team. Quality software.