Fighting Against Bloated Software

Today, hard disk space, memory and internet speeds are cheap, but that shouldn’t be an excuse to write bloated software. Not surprisingly, software development tools tend to be the biggest offenders in this space – massive applications that eat up your disk space and hog system resources.

What can you do if you need to run resource-hungry developer tools all day? You could go buy faster, bulkier computers that can hopefully take the load. You’ll have to guard against constant computer cooling fan noise, but one advantage may be reduced heating bills in winter. You’ll need a bigger backpack too!

HeavyBackpackMeme

What developers really want is productivity everywhere. When you have super-thin lightweight computers like the MacBook or Surface Pro 4 that let you work from anywhere, isn’t it time to call out bloated software? Portability can be performant if software development tools cooperate. This article discusses some of our most-used development tools, comparing them against lightweight efficient counterparts.

I hereby declare an an all-out war against bloated developer tools – make them light or I’m switching!

Visual Studio vs VS Code

Walled garden versus open zen park – that’s how I would describe the Visual Studio versus Visual Studio Code. These two products with the same moniker from Microsoft, could not be further apart. It is obviously not an apples to apples comparison, but the point is, if your code editor is good enough, maybe you don’t need the bulky IDE anymore.

Make no mistake – I spend much of my days in Visual Studio and love the richness of tools in the ecosystem. It is, hands down, one of the best IDEs across any development platform. But over the years, we’ve all just added cruft to Visual Studio and the bloat shows.

VSEnterpriseSize

Surely the free Community edition of Visual Studio 2015 cannot be that big – it is meant to give developers a headstart.

VSCommunityTypical

Hmmm…a 6GB install size is still substantial. But wait until you go into Custom mode in the Installer and check all the boxes.

VSCommunityFull

Yes, I asked for the kitchen sink, but 25GB – are you serious Visual Studio? This high barrier to entry, in terms of size, seems counter-intuitive when attempts are being made to democratize .NET across all platforms and for all developers.

Thankfully, there is VS Code now. VS Code is a lightweight cross-platform code editor with a very different mindset and a mere 62MB install. The focus is squarely on code editing – VS Code unapologetically borrows a few features like Intellisense from Visual Studio, without any of the cruft. Of course, developers have been pusing for VS Code to add features and extensions – but, in my opinion, bloat defeats the purpose.

If you are building NodeJS or ASP.NET 5 applications on any platform, you’ll find VS Code to be an adequately feature-rich code editor. Here’s how you get started building the next generation of ASP.NET web applications in VS Code on a Mac:

  1. Install Homebrew

    $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  2. Grab DNX

    $ brew tap aspnet/dnx
    $ brew update
  3. Grab DNVM

    $ brew install dnvm
  4. Update your ~/.bash profile (optional)

    Add 'source dnvm.sh'
  5. Get the latest DNX

    $ dnvm upgrade
  6. Get the Omnisharp Yeoman ASP.NET Generator

    $ npm install -g generator-aspnet
  7. Scaffold your ASP.NET 5 project

    $ yo aspnet

The scaffolded ASP.NET 5 project structure will resemble pretty much exactly what you get from File | New Project in Visual Studio 2015, and that’s the beauty of the ASP.NET Yeoman generator. Now, simply point VS Code to the root of your web project and you have a rich editor with a file explorer, syntax highlighting, Git integration and side-by-side file edits!

VSCode

Need contextual code Intellisense? You got it.

VSCodeIntellisense

And with the VS Code Command Palette, you can build/deploy your ASP.NET 5 applications all day – without having to leave your editor.

VSCodeCommandPalette

If you are excited about VS Code and the its future, tune in to Microsoft’s Connect() event Nov 18-19th – lots of goodies coming!

Much of the code Intellisense that developers love in Visual Studio is now available outside the IDE – thanks to OmniSharp. With the community and Microsoft contributing to make OmniSharp-powered Intellisense better each day, writing .NET code outside of Visual Studio, and even in other platforms, is very much a reality.

OmniSharp
OmniSharpEditors

SQL Server vs Data Connectors

Let’s talk about the other giant elephant in the room – SQL Server. How many times have you walked into an Enterprise and developers tell you horror stories about the gigantic amount of data and business logic housed in SQL Server relational storage? We all get it – complex enterprise application needs often call for hundreds of related SQL Tables with tons of data.

SQL Server Management Studio does not make the job easier. Yes it is enterprise-grade, complex software, but the bloated and sometimes complex installations often take up precious developer time. Setting up SQL Server is no laughing matter, for both the Enterprise and Express SKUs.

SQLServerSize

SQLExpressPackage

SQLExpressInstall

While you may not always enjoy setting up SQL Server Management Studio and its associated tooling, the need for SQL Server is undeniable. After all, you do need a relational data storage to house your tables and all the data. So, you end up biting the bullet and installing SQL Server on your machine. And the reality is that you may have keep Management Studio open all day, like this Employee table in the sample Northwind database.

SQLTable

What if I told you that you could still get all the benefits of SQL Server without having to install SQL Server Management Studio on your machine? That’s the promise of Data Connectors in Telerik Backend Services – modern cloud services for your applications that leverage your existing SQL data. Simply keep SQL Server installed on a local server and connect to it from via cloud to your machine, without having to install anything! And it’s not just SQL Server. Data Connectors work with a variety of Relational database management stores like MySQL, Oracle, PostgreSQL and even data backends in CRM systems like SalesForce. And once you set up Data Connectors, all of the data and services are available through REST API endpoints, consumable from any application on any platform!

Curious? Here’s how.

Follow the instructions to install the lightweight Data Link Server somewhere behind your firewall that can talk to your SQL Server installation. Next, head to the Telerik Platform, sign in and create a Backend Services project with a Data Connector component.

Now, configure your Data Connector to point to your instance of the Data Link server, along with the Connection String to your SQL Server database, like below. The NGrok URL I’m using is simply to connect to my Localhost Data Link Server – replace that with your actual production Data Link Server URL and you are golden.

DataConnectorConfig

Once your Data Connector can talk to your SQL Server, you can create cloud service entities called Types that map directly to your SQL Server tables, as in the case with the Employee table in my Northwind database below.

DataConnectorType

Once set, you can open up any of the Types, and see all the data coming straight from your SQL Server. Actually, you can add, edit and delete data just as you would from inside SQL Server Management Studio, except all of this is from within your browser!

DataConnectorTypeData

Now I can anticipate your next question – SQL Server is so much more than just data tables – what about the years worth of sophisticated SQL Server Stored Procedures? Yes, I agree – there is a lot of complexity and even some business logic entrenched in the depths of your SQL Server Stored Procedures.

SQLStoredProcs

Relax – none of that has to go away. You still get to host all your data on-premise and behind your firewall. Telerik Data Connectors simply offer you a view into your SQL Server, with a thin real-time transport layer and without storing any of your data in the cloud. And the story would be pretty incomplete without access to your beloved Stored Procedures, right?

You can create a simple Business Logic component in your Backend Services project from Stored Procedures. Since Data Connectors can already talk to your SQL Server, it can also do some reflection to find all the Stored Procedures that already exist within each database – how cool is that?

DataConnectorStoredProcs

Once you pick a Stored Procedure, you can also utilize all the parameters that the procedure takes with a direct one on one mapping. The end result is a RESTful Cloud Function endpoint that invokes your SQL Server Stored Procedure in real time. This offers a great way to expose your legacy data and functions for the modern mobile world.

DataConnectorProcParams

XCode vs CLI/Browser

Now surely the Mac/OSX hispters would be much more savvy about bloated software, right? After all, Apple works hard every year to shave off another inch from their laptops. But if you want to write native iOS apps and proceed to install the XCode IDE, along with iOS SDK on your Mac, it is a mere 4.3GBs!

XCodeSize

Here’s a food for thought – why go native iOS with XCode, when you can go native cross-platform with JavaScript? That’s the promise of NativeScript. Plus, NativeSript does not force you to install bloated IDEs. It offers lightweight CLI tooling which, along with your code editor of choice, is all that is needed.

Here’s how to get started:

  1. Grab {N}

    $ npm i -g nativescript
  2. Create your {N} project from terminal

    $ tns create NSHello
  3. Add Platform support

    $ tns platform add ios
    $ tns platform add android

Once the NativeScript CLI has scaffolded a project for you, take a look at your file explorer. A NativeScript project is made up of pure JavaScript/TypeScript, XML and CSS assets that create a truly native mobile app.

NSCLI

Point your favorite code editor to root folder of the NativeScript project and off you go. Sublime Text is very popular and it works beautifully when you’re writing JavaScript, XML and CSS. You get a solution explorer, syntax highlighting and code completion as you build your NativeScript app.

There is in fact a complete workflow for {N} development in Sublime Text, so you never have to leave your editor.

NSSublime

Want a lightweight cross-platform code editor that is tailored for mobile development? Stay tuned for a Telerik Platform announcement coming up soon – something absolutely beautiful called ‘Proton’ awaits you. Sorry, could not resist the tease!

But doesn’t one need the native emulators for iOS/Android that come with the SDKs for mobile development? Well, sure, they help. But if you’re like me, who shrugs away from heavy installations, there is a beautiful alternative.

Simply use a physically-connected device or grab the corresponding NativeScript Companion apps for iOS/Android, and deploy directly to your devices. As an added bonus, you don’t have to keep deploying the full build of your app over and over again – tap/hold with three fingers within the companion app, and the Live Sync feature kicks in. It offers incremental cloud builds that include just the code changes you just made deployed wirelessly to your mobile device.

Want an even more lightweight solution to building cross-platform mobile apps? You could bypass the CLI tooling and go with the most ubiquitous virtual machine – yes, your browser.

The Telerik AppBuilder In-Browser Client lets you build native or hybrid cross-platform mobile apps entirely in your browser. You get code syntax highlighting/completion right in your browser, as well as, easy options to deploy your mobile apps to simulators or directly to devices.

ABinBrowser

Conclusion

Lightweight computing. Productivity everywhere. That’s what modern developers want.

While there is undeniable value in rich development IDEs, the convenience of lightweight alternatives make a strong case for portability. The OS you are on and the development tools you use should matter less moving forward – in the end, what you want is whatever offers the easiest path towards building the next generation of amazing web, desktop and mobile apps. When you’re in zone, you just want to write code – with a minimum level basic support but without the hassles of large, heavy installations.

We’re makers. Let us build beautiful software with lightweight tools. Are you with me?

Header image courtesy of U.S. Naval Forces Central Command/U.S. Fifth Fleet

Comments

  • jcesar

    As far as I know, even if you use nativescript CLI you still need xcode installed (at least it’s a requisite on the getting started docs). And if you know swift or objective-c, switching to nativescript might not be a good idea if you don’t know javascript

    • Samidip Basu

      @disqus_79wF9K2oGE:disqus You’re right .. this article simply points out some of the bloat. NativeScript CLI tooling uses some of XCode SDK features, especially the simulators; but you have the option of bypassing everyday usage if you deploy directly to devices. Also, if you went with Telerik AppBuilder In-Browser client, you wouldn’t have to install anything. At the end of the day, pick your tools based on your skills, portability of usage and the type of app you’re trying to build. Choice is a good thing, right? 🙂

  • Pingback: Dew Drop – November 20, 2015 (#2136) | Morning Dew()

  • Pingback: The Era of Portable .Net - Telerik Developer Network()

  • Sebastian Gruchacz

    That reminds me… (Many) few years ago I’ve been instaling BT driver. Simple driver, to support generic, external BT dongle on my desktop PC’s USB port. It’d wasted astonishing 200MB of my HDD! O_o So I totally agree to blamy any bloatware I encounter… That also reminds me another bloat approach – Yahoo Messenger checking several times per second some registry entries… (Also, I’ve been using this many years ago.)

  • Let us build beautiful software with lightweight tools. Are you with me?

    No, i’m entirely against you. Development should be done in a rich IDE. I’m not opposed to slicing things up more to make things “lighter”. However, i taught myself to write html in the 90s inside notepad.exe after using Dream Weaver and being shown how an IDE supporting something like live edit. I never went back to notepad.exe

    It absolutely boggles my mind that we’re only several years from 2020 and people want to write software in a glorified notepad.exe. No thanks. I make my IDE even “bigger” with resharper and a couple other addins (web essentials for example). It’s the same reason professional construction equipment exist, you can dig a ditch with a shovel, but you with a shovel can never dig a ditch as fast as a backhoe.