Tag Archives: developer

4 Mantras for Designing Scalable APIs

4 Mantras for Designing Scalable APIs - YWF

The idea of scalability is often offered with a great selling point. For instance, you may be familiar with these tags, “Make your API scalable by tying into our simple API” or “you too can make your service scalable by licensing our endpoint collating system”. These are common sales pitches, but they’re tying into a magic service to make scalability happen, as a web developer, you are likely not being scalable – there’s no silver bullet, and adopting a quick fix doesn’t address underlying architectural deficiencies. Generally, scalable can be defined into 4 big definitions:

  • Extensible: At most basic level, scalable software is extensible. Instead of limiting the functionality, it allows multiple avenues to tie into the underlying services and systems to enable extensions and other services. Amazon’s API Gateway is one of the examples.
  • Built into the Architecture: Scalability can’t be separated from the API itself. So, to make it simple, please build for scalability from the onset. In fact, you can use third party to increase your scalability, especially when they assist a built-to-scale approach.
  • Implies Demand Balancing: As its name, “scale”, you can manage one hundred requests as with one million. However, scalability demands efficient performance, regardless of technique or methodology, both at extremely high traffic and extremely low traffic.
  1. Design for a Repeating Launch Day

Launching a product can be really stressful, you may have prepared for everything, but you simply cannot know the requirements your system might see. For instance when launching a service, what kind of traffic can we expect? Let’s say we’re launching a new social platform that ties into an API to handle 200k calls an hour but the rate has surpassed to several millions of calls. This means that you need to address the foundation of your API as if you are always on the verge launching. Besides, you may need to use load balancer as it can determine between your success and failure. Moreover, having failover paths and secondary functions will produce you to a huge difference towards user experience.

The last important thing is to integrate analytics into your system. By knowing trends developing in real time will help you develop in an agile way and address deficiencies as they arise organically, while predicting further failures down the road.

  1. Anticipate Success

No one will truly know how successful you’re actually going to be. This is because it’s not a simple consideration of traffic, either – traffic might be high even if you’re the second or third most popular choice. Therefore, a provider will plan for the most extreme case possible as he doesn’t know how much traffic they can expect. Another way to frame this would be to anticipate success.

  1. Non-Extensible is a Unitasker

If your application is not extensible, traffic management and scalable mindset is nothing. While extensibility is indeed its own concept, with its own considerations and implications, whether or not a service is extensible can have a direct impact on whether or not it’s scalable. In the end, there is no way that a provider can know literally every possible future use and application of their service while it’s a great practice to develop with scalablity from the onset.

  1. Efficiency is King

You will face so many complexities within your problem, so it is important to know how to simplify your API architecture and thus simplify the resultant solution applied to the problem. In fact, you can drastically reduce the actual resources needed by an application by increasing efficiency.

7 Common On-Site Search Mistakes and How to Fix Them

Common-On-Site-Search-Mistakes-and-How-to-Fix-Them_ywf

Search function is necessary in any website; therefore, you need to be more careful as search function could be damaging your conversion rates. However, when it is well optimized, you can enhance the search function, the usability and enjoyment of your site. As a web developer, you surely want more users enjoy your site, right? Learn how to optimize on-site search and avoid the common mistake that may occur.

It isn’t Visible
First, make sure that your search form isn’t invisible. Creating a search form that is hard to find will frustrate your users. So, ideally your search bar should be located near to the top and left side, the closer, the better. While the search box might not be the first thing that users will see, but you need to be smart to know where you can place it. The right location should be within normal reading patterns.

It isn’t Easy
Anything that places an obstacle between your user and completing their search detracts from its accessibility. So, make sure that any text would disappear once the user starts typing. On the other hand, it is important to increase the accessibility of your search bar include cosmetic changes like color use and text readability. Then, make sure they are sharp and contrasting.

Auto-Suggestions Aren’t Provided
With auto-suggestions, you can speed up the search process significantly for the user, especially if you offer multiple models or versions of a core product. In fact, the less time users must spend typing in their query, the longer they can spend engaging with the content they’re trying to find.

The 404 Isn’t Helpful
You can maximize the usage of 404 pages. It can be useful and beneficial for your users. For instance, you can place links to main directories, offer suggestions for reworking the search query, or direct them to your contact page. The point is to offer solution or answer to your users.

Results Aren’t Straightforward
It is important to create familiar and dressed down search result pages. Hide the bells and whistles of your engine under an advanced search link and, if possible, have the search menu expand without leaving the page. Make sure that the search results landing page is easy to read on first pass, providing legible, plain fonts, and clean composition so that results can be assessed individually.

Filters and Sorting Methods are separated
Since users don’t want to perform any additional work, ensure that sorting options, such as date, popularity, and etc. can be accessed from the same page. Place the options on the top left corner at the start of the search results to increase visibility.

No Search Variation
Always provide your users with variation search results. For example, when a user types “black dress”, you can offer them with alternative search query options and results (such as “black” and “dress”) in separate sections.

By this way, Google can provide closest equivalent, even if you don’t have the product or information they’re looking for. Providing something close, even if not exactly what they searched is more beneficial than an empty results page.

 

5 ways for Creating Better, Faster and More Optimized WordPress Websites

Creating better faster and more optimized wordpress websites

There are always new updates in WordPress, so that every developer should learn the latest optimization practices.  But, mostly seasoned developers focus on what they are good at. Then, neglect or don’t have time to learn the latest optimization practices. If you happen to be one among those kinds of web developers, you need to read the following tips. This article can help you create better, faster and more optimized WordPress sites.

  1. Switching Hosts Isn’t Always a Quick Fix

If you think that switching hosts will automatically fix certain problems, you may need to reconsider your opinion. In fact, you still experience some code issues or compatibility problems with specific plugins even though you have changed your host. A managed host will provide as much assistance as they can, but won’t debug an issue with a bad plugin or code for you. Therefore, you need a WordPress developer to dig into it and make a determination as to what the issue is. In fact, to solve these problems, many hosts provide third-party partners and developers.

  1. Don’t Try Editing Your Code

To avoid WordPress sites go down, you need to make sure that no one is editing a PHP file directly from the appearance editor in the dashboard. But, how? You can use the following code in your wp-config.php file, removing the edit_themes, edit_plugins, and edit_files capabilities for all users. This method will prevent users to hack away at the code and break the site.

define(‘DISALLOW_FILE_EDIT’, true);

Take this process one step further to update themes or install plugins and remove the functionality for clients to update. Place the following code in your wp-config.php file to restrict these capabilities.

define(‘DISALLOW_FILE_MODS’, true);

  1. Don’t Cut Corners on Your Themes and Plugins

WordPress might be the foundation of your site, but the themes and plugins are also important elements. Therefore, you need to choose your plugins carefully. Do a little research and look for its ratings and reviews beforehand.

Recent research even shows that nearly 50% of the plugins in the repository haven’t been updated in over 2 years. This makes these themes and plugins are easy to get infected with malware. Another thing to be on the lookout for is a bundled plugin that should be updated. This surely will cause a huge problem for WordPress users who buy things via online marketplace. On the other hand, this method will open a wide chance for hackers and site owners are extremely vulnerable.

  1. Watch Your Admin AJAX Calls

Inspect any plugins that may utilize AJAX, for instance, the WordPress Heartbeat API uses /wp-admin/admin-ajax.php to run AJAX calls from the web-browser. Mostly these kind of files occurs during  traffic spikes, CPU load, and can bring your site to a crawl.

If you find there are 3rd party plugins that utilize admin-ajax.php, make sure that everything runs in the correct way. Besides, you can figure out what plugins might be causing it by looking at the HTTP POST request action and quickly determine, based on its name. However, AJAX does load after the page loads.  So, this is not always a bad thing to see this in a speed test.

  1. Ensure PHP 7/HHVM Compatibility Before Jumping on Board

Nothing can beat PHP7 and HHVM when it comes to boosting WordPress performance. But, before you are tempted to use these programs, you need to make sure that your site is compatible with the program. This means before you are upgrading from PHP 5.6 to 7, you need to test all functionalities of your WordPress site in a staging environment or locally to ensure there aren’t any compatibility issues.