• Sidecar for a Code splitting


      Code splitting. Code splitting is everywhere. However, why? Just because there is too much of javascript nowadays, and not all are in use at the same point in time.


      JS is a very heavy thing. Not for your iPhone Xs or brand new i9 laptop, but for millions(probably billions) of slower devices owners. Or, at least, for your watches.


      So — JS is bad, but what would happen if we just disable it — the problem would be gone… for some sites, and be gone "with sites" for the React-based ones. But anyway — there are sites, which could work without JS… and there is something we should learn from them...

      Get in the sidecar!
    • Selecting, caching and displaying photos on the map

      • Translation

      In this article, I decided to describe how the functionality of selecting and displaying photos on a specific place on the map was implemented in our photo service gfranq.com. The photo service does not work now.



      Since we had a lot of photos in our service and sending requests to database every time the viewport changes was too resource-intensive, it was logical to divide the map into several areas that contain information about the retrieved data. For obvious reasons, these areas have rectangular shape (although hexagonal grid was considered too). As the areas become more spherical at large scales, elements of spherical geometry and tools for it were also considered.


      In this article, the following issues were raised:


      • Storing and retrieving photos from the database and caching them on the server (SQL, C#, ASP.NET).
      • Downloading necessary photos on the client side and saving them to the client cache (JavaScript).
      • Recalculation of photos that must be hidden or shown when the viewport changes.
      • Elements of spherical geometry.
      Read more →
    • ES6 Proxies in practice

      With the appearance of ECMAScript 2015, an avalanche of features came; some of them make you mad, and others are pleasant surprises, like meeting an old friend after a long time.


      Some features are related to metaprogramming. What is that? I'm not very eloquent, so let's turn to our friend, Wikipedia.

      Read more →
    • Ads
      AdBlock has stolen the banner, but banners are not teeth — they will be back

      More
    • Google+ is Dead. So what?

        Google shut down their social media platform Google+ on April 2, 2019. It’s hard to find some technical article that hasn’t mentioned the end of Google’s social network era. But, a high level of consistency in connectivity within services of the company had received scant attention. In this article I would like to share my thoughts on the internal way of Google services consistency and what it means for Google API users when it comes to a Google+ shutdown.

        Read more →
      • NodeJS logging made easy


          How many times did you write logger.info('ServiceName.methodName.') and logger.info('ServiceName.methodName -> done.') for each and every method of your service you wanted to log? Would you like it to be automated and has the same constant signature across your whole app? If that's so, we're very much alike, we have suffered the same pain too many times, and now we could finally try to resolve it. Together. Ladies and gentlemen, let me introduce… class-logger!

          Read more →
        • Memoization Forget-Me-Bomb


            Have you heard about memoization? It's a super simple thing, by the way,– just memoize which result you have got from a first function call, and use it instead of calling it the second time - don't call real stuff without reason, don't waste your time.


            Skipping some intensive operations is a very common optimization technique. Every time you might not do something — don’t do it. Try to use cache — memcache, file cache, local cache — any cache! A must-have for backend systems and a crucial part of any backend system of past and present.

            Got the idea? Forget it!
          • React Code Splitting in 2019

              It's 2019! Everybody thinks they know code splitting. So - let's double check!



              What does code splitting stand for?


              In short – code splitting is just about not loading a whole thing. Then you are reading this page you don't have to load a whole site. When you are selecting a single row from a database – you don't have to take all.
              Obvious? Code splitting is also quite obvious, just not about your data, but your code.

              Read more →
            • Announcing TypeScript 3.4 RC

                Some days ago we announced the availability of our release candidate (RC) of TypeScript 3.4. Our hope is to collect feedback and early issues to ensure our final release is simple to pick up and use right away.


                To get started using the RC, you can get it through NuGet, or use npm with the following command:


                npm install -g typescript@rc

                You can also get editor support by



                Let’s explore what’s new in 3.4!


                Read more →
              • Universal C# Code for NET and JavaScript

                • Translation

                In 2013, while working at GFRANQ photo service, I participated in the development of an eponymous web service for publishing and processing photos. Filters and transformations were defined in the file with parameters, and all processing was carried out on the server. During service development, there was a need to support these transformations on the client side for the preview. According to Larry Wall, one of the virtues of a programmer is laziness. Therefore, as truly lazy programmers, we thought about the possibility of using the same code on both the server and client sides. The entire development was conducted in C#. After researching the libraries and a couple of attempts, we proudly concluded that this was possible and began to write the universal code.



                Why is this article needed? Indeed, 6 years have passed since 2013, and many technologies have lost their relevance, for example, Script#. On the other hand, new ones have appeared. For example, Bridge.NET or Blazor based on the fancy WebAssembly.


                Nevertheless, some ideas can still be used. In this article I tried to describe them as detailed as possible. I hope that the mention of Silverlight and Flash will cause a smile with a hint of nostalgia, and not a desire to criticize the old solutions. Anyway, they have contributed to the development of the web industry.

                Read more →
              • Details

                How often do you get to 404 pages? Usually, they are not styled and stay default. Recently I’ve found test.do.am which interactive character attracts attention and livens up the error page.

                Probably, there was just a cat picture, then they thought up eyes movement and developer implemented the idea.imageNow user visits the page and checks out the effect. It’s cool and pleasant small feature, it catches, then user discusses it with colleagues or friends and even repeats the feature. It could be this easy, if not:
                Read more →
              • Another way to write cross-platform apps: Neutralinojs internals and comparison with Electron and NW.js


                I am Shalitha Suranga from Sri Lanka. I started Neutralinojs project with other two members as our research project at university.


                Cross-platform application development is extremely useful among software development organizations because a large end-user audience can be targeted. Earlier there were several approaches, such as writing multiple codebases per each platform, writing a single codebase using conditionals for platform selection, or using a programming language which has a cross-platform virtual machine at run-time. There were drawbacks of each like complexity of design, limited low-level accessibility and slow learning rate. Cross-platform application development with web technologies came [1] after. Electron and NW.js are most popular frameworks which allow developers to make cross-platform applications using Javascript. Basically, these popular frameworks combine embedded chromium browser and node run-time [2], [3].


                These frameworks are being used to create numerous cross-platform applications. Whereas the community pointed out several unseen drawbacks of these frameworks. Large bundled application size, high memory consumption and long development workflow are the key things which were criticized through internet forums and websites [4], [5], [6], [7], [8]. Table 1.1 shows the advantages and disadvantages of Electron/NW.js.


                Table 1.1: Advantages and Disadvantages of Electron/NW,js


                Advantages of Electron and NW.js Disadvantages of Electron and NW.js
                Development is very easy since Javascript is used Application bundle is considered as bloatware (High disk space usage)
                Access native functions via node runtimeSingle codebase for all supported platforms Linux, Windows and macOS High memory consumption and slowness
                Many Node modules need to be installed
                Read more →