Wednesday, 29 March 2017

How Beneficial is NLog for .Net Developers?


Recently, Microsoft redesigned the core architecture of .NET Framework and ASP.NET. The developers can now use .NET Core as a cross-platform and open source framework. Likewise, they can use ASP.NET Core to build a variety of cloud-based web applications and mobile backends within a shorter amount of time. Microsoft further allows .NET Core developers to work with an array of popular third-party frameworks and libraries.
The .NET developers have option to use a number of third-party logging and tracing tools. Each logging tool is designed with features to record detailed information about the execution of various .NET applications. The information recorded by these tools help programmers or testers to perform debugging and testing more efficiently. They can use the logs to identify the defects in an application, monitoring/auditing the live software, and debug the application code after deployment.
As a widely used .NET logging library, NLog enables developers and testers to generate high quality logs for application developed with .NET, Silverlight, or Xamarin. It has the capability to process the diagnostic messages generated by various .NET languages including C# and VB.NET. The logging platform further augments each diagnostic message with contextual information like data and time, environment, severity, process and thread. Also, NLog further allows users to display, store, and pass the log messages to multiple destinations and by targeting over 30 targets.
Understanding Important Features of NLog
Simple Configuration
The users can download and install NLog in a number of ways. A user has option to download the source code of the .NET logging library as a zip file from Github or avail NLog as binary packages from Nuget. He can further configure NLog in two distinct ways. Based on his preference, a user can configure the .NET logging library either through a single XML file or programmatically. Also, he can make changes to the configuration without restarting the applications frequently.
Templatable Log Messages
NLog further enables developers and testers to enhance the quality of log messages by converting them into templates. The users can easily template the log messages by using a variety of layout renderers. Each layout renderer is designed as a template macro used in Layouts. As an attribute of targets, the layouts determine the format in which the library will log the information. NLog further allows developers to create custom layout renderers according to their specific needs.
Generate Detailed Logs
The developers can use NLog to add sophisticated tracing code to .NET applications. In addition to processing the diagnostic message generated by various .NET languages, NLog further augments each message with contextual information, and indicates its severity by linking it to a log level. NLog makes the logs elaborate and comprehensive by augmenting contextual information like current data and time, stack trace/information, values of environmental variables, exceptions, machine, process and thread names. Also, it indicates the severity of the log by associating with any of the six levels – trace, debug, info, warn, error and fatal.
Over 30 Targets
NLog supports over thirty targets for a single message. Each developer has option to decide the way the diagnostic messages from their source to the targets simply by defining rules. For instance, a programmer can write rules to display, store and pass the log messages to varying targets including files, database, console, email message, and event logs. He has option to store the logs in a database, write the logs to multiple files, write the event logs to remote or local logs, or format the logs with a command-line console. Likewise, he can trigger an email each time an application error occurs. The ASP.NET developers even have option to get the log messages written through a built-in trace provided by the web framework.
Option to Customize and Extend
In addition to adding contextual information to each log and target multiple destinations, the users also have option to write custom targets and use custom values. The developers can further create and registered the custom tags without putting extra time and effort. But they can write custom logs to get log messages written on non-standard targets and work with new protocols currently not supported by NLog. Also, they can take advantage of a special kind of targets called wrappers. Unlike targets, wrappers lack the capability to perform logging. But the developers can use wrappers to emulate and modify behaviour of other loggers. They also have option to use a variety of wrappers according to their specific requirements.

However, NLog is yet to support .NET Core. The upcoming version 4.4 of the .NET logging platform will support .NET Core and its new features. At present, NLog supports versions 3.5, 4, 4.5, and 4.6 of .NET Framework; versions 4 and 5 of Silverlight; Windows Phone 8; and Xamarin iOS and Xamarin Android. Hence, the developers can use NLog to debug and test a variety of applications more efficiently.

Wednesday, 15 March 2017

10 Advanced Tips to Improve Your PHP Programming


A gradual increase is being noted in the number of web application developers switching to PHP 7 to avail an array of new features, along with enhanced speed and reduced memory consumption. They can further take advantage of the robust PHP frameworks and development tools to reduce the amount of time and effort required for building modern web applications. But the programmers still need to focus on the quality and readability of PHP code to maintain and update the web application without putting extra time and effort. Both novice and experienced web developers must keep in mind some simple tips to produce high-quality PHP code.
10 Tips to Improve the Quality of PHP Code
1) Pick the Right Function
While writing PHP code, the developers can accomplish a single task using multiple functions. But the execution speed and resource consumption differ from one function to another. Hence, it is important for the programmers to pick the right function to accomplish the task without affecting the website’s performance. For instance, while determining the length of a string, the programmers must use isset() instead of strlen() as the former makes calls much faster and stays valid regardless of existence of the variable. Likewise, the developers must replace ereg_replace() and preg_replace() with str_replace() to replace strings. But they need to use ereg_replace() and preg_replace() instead of ereg_replace() while using regular expressions.
2) Use Ternary Operators instead of If/Else Statements
It is a common practice among developers to use If/Else statements to execute code conditionally. But the If/Else statement requires programmers to write multiple lines of code. While writing PHP code, the developers can accomplish the usage of If/Else statement by using a ternary operator. The ternary operator further enables programmers to write the code in a single line, and keep the code clean and clutter-free.
3) Cache Most Scripts
On Apache web server, HTML page is served faster than PHP scripts. Also, the web server need to recompile the PHP scripts each time a page is requested, if the scripts are not cached. The developers must choose and install the right PHP caching tool to reduce script compilation time, and improve the application’s performance. They can even consider using a high-performance memory object caching system like memcache to cache maximum scripts and reduce database interactions.
4) Keep Error Reporting on
Often programmers have to put extra time and effort to repair the errors and issues in the PHP code. But the developers can easily produce flawless code by turning the error reporting to E_ALL. Also, they need to ensure that the error reporting option is not turned off till the application moves to production mode. The error reporting option will help developers to identify both minor and major errors in the PHP code almost immediately.
5) Use Single Quotes instead of Double Quotes
PHP allows programmers to write a single line of code using either single quotes (‘) or double quotes (“). But the developers must remember that single quotes speed up execution of loops, and hence boost the PHP’s application’s performance. However, they still have to write the same line of code differently using single or double quotes. They need to make it a practice to print longer lines of information using single quotes instead of double quotes.
6) Use Built-in Functions
PHP enables users to accomplish common tasks by using several built-in functions. The programmers can easily refer to the user manual to gather detailed information about PHP’s built-in functions and their usage. They must use the built-in function to accomplish specific tasks without writing additional code. The built-in functions further help developers to keep the code clean and readable.
7) Pick and Use Relevant Variable Names
PHP allows programmers to declare variables without specifying their types. While writing PHP code, the developers can follow any commonly used naming convention. But the developers must use relevant variable names to make the code readable and reusable. The must pick names that add value and conveys the nature or type of the variable clearly. For instance, they can convey the type of variable through its name. Likewise, the name of the variable can indicate the data it will store.
8) Follow the Same Naming Conventions Consistently
As noted earlier, PHP allows programmers choose from a number of commonly used naming conventions for classes, objects and variables. But the programmers must use the same naming conventions consistently throughout the coding process to make it easier for others to read and understand the code. Likewise, they can also follow the naming convention for files saved in local directories, and choose names that convey the nature and usage of individual files clearly.
9) Add Comments to Each Code Snippet
While developing a PHP web application, the programmers must remember that it may be maintained or managed by other developers. So he needs to make it easier for other developers to manage the software by clearly describing the significance and usage of individual code snippets. The programmers can easily describe the need for a specific code snippet by adding comments. In addition to making the code readable and easy-to-understand, the comments enable different PHP web developers to work on a single project.
10) Pick the Right PHP Framework
Each developer can execute PHP code in two distinct ways. He can either embed the PHP code into HTML or execute the code using PHP frameworks. The developers also have option to choose from many open source PHP frameworks including Symfony, Yii, CakePHP, Laravel, CodeIgniter and Zend. The features and resources provided by these frameworks make it easier for programmers to accomplish common tasks without writing additional code. But the features, functionality and performance of individual PHP frameworks differ. Hence, it is important for developers to pick the right PHP framework based on the requirements of each project.  

In addition to writing high-quality PHP code, the web developers also need to monitor and maintain the code base consistently. When they monitor the code throughout the development process, it becomes easier for programmers to identify the errors in the code and weaker pieces of code. Likewise, they need to use specific tracking tools to evaluate the performance of front-end and back-end off the web application written in PHP.

Wednesday, 1 March 2017

The Growing Importance of Telemedicine in Healthcare


His current geographical location directly affects a patient’s access to conventional healthcare services. The people living in urban areas usually find it easier to avail prompt and relevant healthcare services. On the other hand, the rural people often have to travel long distance and incur additional expenses to avail the services of specialists and skilled healthcare providers. That is why; a steady increase is being noted in the number of patients availing healthcare services remotely through mobile devices and apps.
Many analysts believe that the number of patients switching from conventional healthcare services to telemedicine services will grow exponentially over next few years. According to Healthcare Trends Institute, “Telemedicine makes up nearly one-fourth of the health IT market that was valued at $15.6 billion in 2014 and is expected to increase to approximately $20 billion by 2019.” The growing demand for telemedicine services will encourage many clinics and healthcare practitioners to deliver a variety of healthcare services to patients and remotely. At the same time, the telemedicine services will also make it easier for patients to avail a variety of healthcare services promptly regardless of their current location.
Why Telemedicine Will Soon Become an Integral Part of Healthcare Industry?
High Mobile Devices and Internet Penetration
A number of studies have shown compounded annual growth rate of mobile internet users. Likewise, a large percentage of modern users also use mobile apps and access websites on their mobile devices on a regular basis. Hence, more and more patients will soon use their smartphones, tablets or phablets for accessing a variety of services and apps. The high mobile penetration rate will enable patients to avail healthcare services remotely and efficiently on their mobile devices. At the same time, the medical practitioners and providers can take advantage of custom applications and solutions to diagnose patients remotely and provide prompt telemedicine services.
Rapid Advancement in Telemedicine Technologies
The healthcare practitioners and providers can use advanced telemedicine technologies to access the latest electronic health records, medical history, and diagnostic images of patients remotely and instantaneously. They can even use the remote monitoring systems to provide relevant healthcare service to patients by interpreting their latest health data. Hence, the advancement in telemedicine technologies has enabled physicians to make a proper diagnostic and implement the right treatment plan without meeting the patient in person. Likewise, the patients can take advantage of the emerging telemedicine technologies to contact doctors/specialists and avail prompt healthcare services without visiting the clinic frequently.
Enhanced Access to Healthcare Services
As mentioned earlier, the people living in rural areas often find it difficult to avail prompt and relevant healthcare services. Some patients even have to travel long distance and incur additional expenses to avail the services of a specialist. The telemedicine technologies will enable patients to contact specialists and avail prompt healthcare services without putting extra time, effort and money. They can take advantage of the telemedicine programs implemented by various clinics to connect with doctors and specialists regardless of their current location. Also, the telemedicine technologies will enable medical practitioners and providers to offer their services to a higher number of patients on a daily basis.
Improved Health Quality
A patient can easily avoid advanced and expensive treatment through early diagnosis and effective treatment. The telemedicine technologies and devices will enable physicians to diagnose the patients based on their latest health information, and treat them more effectively. These technologies will further make it easier for rural healthcare practitioners to communicate with specialists, and provide more relevant treatment to each patient. The enhanced and smooth communication will enable physicians to treat a higher number of patients remotely, early and effectively. The patients can further take advantage of the telemedicine technologies to avail clinical healthcare services without any delay or obstacles.
Better Patient Engagement
A number of studies have shown how patients can avoid advanced and expensive healthcare services by meeting predefined healthcare goals. The healthcare goals of individual patients vary. But the patient’s healthcare goals can include maintaining appointments and care schedules. The telemedicine technologies will keep the patients, healthcare practitioners and providers in a virtual environment. Hence, the technologies will make it easier for healthcare practitioners and providers to enhance patient engagement. The physicians will involve patients in the treatment process to identify the signs early and provide treatment or care promptly.
Reduced Healthcare Cost
Many analysts believe that telemedicine will bring down the cost of advanced healthcare services. The clinics can take advantage of telemedicine technologies to provide healthcare services to more patients without deploying additional manpower and extending infrastructure. Hence, more and more clinics will implement telemedicine programs to increase revenue by providing a variety of clinical healthcare services to patients living in rural areas. At the same time, the technologies will further help patients to avoid expensive treatments, and avail prompt healthcare services without incurring travel expenses.
Making Healthcare Practitioners and Providers Productive
Nowadays, clinics and hospitals explore ways to provide healthcare services to more patients by overcoming constraints related to manpower, equipments, and infrastructure. The telemedicine technologies will enable them to offer healthcare services to a higher number of patients remotely by making the healthcare practitioners and providers more productive. For instance, a clinic can implement a telemedicine program to enable the doctors and specialists to treat patients from various regions. Likewise, they can use the telemedicine solutions to make the nurses and healthcare providers to serve more patients efficiently on a daily basis.
However, the growth and adoption rate of telemedicine service will be directly impacted by a number of factors like privacy protection, healthcare laws, and reimbursement policies. The clinics and healthcare providers have to address these issues successfully to deliver telemedicine services smoothly to a large number of patients. They also need to build a robust infrastructure and use custom applications to accelerate delivery of telemedicine services.


Thursday, 16 February 2017

Should you use Nancyfx for your ASP.Net Applications?


In June, Microsoft announced ASP.NET Core 1.0 with a number of architectural changes. In addition to being cross-platform, the completely redesigned edition of ASP.NET further simplifies development of modern web applications and services by providing a set of new tooling and features like side-by-side app versioning support, built-in dependency injection support, and Cloud-ready configuration. Also, it allows you develop both Web UIs and Web APIs by using a single aligned web stack.
You still have option to use additional tools to build HTTP based services without putting extra time and effort. Nancyfx is a lightweight and open source framework, inspired by Sinatra - a widely used Ruby framework, and designed with features to facilitate development of HTTP based services on both .NET and Mono. Despite being built with .NET framework client profile, Nancyfx is designed to run anywhere, be easy to configure, and provide a super-duper-happy-path to various interactions. You can always consider using Nancyfx to enhance the functionality and performance of ASP.NET applications.
10 Reasons Why You Should Consider Using Nancyfx for ASP.NET Applications
1) No Need to Apply MVC Pattern
You can use Nancyfx for web applications, web services and web APIs. But Nancyfx does not require you to implement model-view-controller (MVC) pattern. You can use it as a service end point to handle varying requests like GET, HEAD, DELETE, PUT, PATCH, POST and OPTIONS. Also, you can take advantage of the domain specific language (DSL) to return a response without writing additional code. However, you still have option to apply MVC pattern to Nancy in a manner similar to ASP.NET MVC.
2) Supports for .NET and Mono
As noted earlier, Nancyfx is designed with features to simplify development of HTTP based services on both .NET and Mono. Hence, you can run the lightweight framework on three major platforms – Windows, Linux and OS X. The compatibility further complements the cross-platform web application developed with ASP.NET Core 1.0. Also, you can post the HTTP services from one platform to another without any hassle.
3) Compatible with Embedded Devices
The efficient machine to machine communication enabled by Internet of Things (IoT) has made it essential for developers to build web applications and APIs compatible with a variety of devices. In addition to supporting .NET and Mono, Nancyfx is also compatible with embedded devices like Raspberry Pi and Arduino. Also, the host-agnostic nature of the framework enables you to run it in number of ways – run it through IIS, integrate it with a self hosted application, or embed within an EXE. Hence, Nancyfx, unlike other full-blown web servers, can be used efficiently in constrained environments and with embedded devices.
4) Minimal Configuration
You can download and use Nancyfx directly without worrying about complex configurations. There is no need to scan through the preset configuration or make changes to complex XML files. Also, the self-agnostic nature of Nancyfx enables you to run it in varying environments without modifying the web.config file frequently. Despite being lightweight, Nancyfx is designed with features to identify and embed new modules, dependency and components, and change the configuration according.
5) Highly Customizable and Extensible
In addition to being easy to configure, Nancyfx is both customizable and extensible. You have option to replace specific parts of the framework according to the requirements of individual ASP.NET applications. You can further customize Nancyfx by using custom view renderers, serializers or model binders. Also, you can control the way the framework handles requests by implementing INancyEngine in your own way. You also have option to create 3rd party library with extensibility points generated by modifying behavior of Nancyfx.
6) Keep Your Application Code Clean
The terse syntax provided by Nancyfx will help to keep the code clean and organized by allowing you to write code without affecting any aspect of the application. Also, the low ceremony feature of the framework will enable you to include minimal code in the application. You can even take advantage of the terse syntax and low ceremony features to embed functional Nancyfx applications into simple and lightweight web applications and APIs.
7) Option to Modify Requests and Responses
Nancyfx allows you to make changes to both requests and responses before and after invocation. You can take advantage of pipeline hooks to control the entire communication between the web application and the server. The feature allows you to make the web application deliver personalized experience saving key session information of users in the database. Likewise, you can also use the pipeline hooks to modify the way request.form is populated on HTTP POST.
8) Library to Test Request/Response Cycles Fully
ASP.Net web developers can take advantage of the built-in testing library included in Nancyfx to evaluate request and response cycles fully. You can use the library to check if a request returns the expected model or not. Likewise, you can use the testing library to check if the response adheres to expected format each time accept headers are passed into it.
9) Find and Manage Dependency Automatically
Nancyfx makes it easier for you to find and manage project dependencies automatically through a built-in IOC container called TinyIOC. You also have option to use TinyIOC t different places in application lifecycle through the Bootstrapper class. The methods and properties off the Bootstrapper class further simplifies Nancyfx configuration. However, you still have option to register and manage project dependencies by using several widely used IOC containers supported by Nancyfx.
10) No Need for Specific Framework or Implementation
Often ASP.NET micro-frameworks require web developers to stick to specific frameworks or implementation. But you can use Nancyfx without any using any specific frameworks or implementation. Also, Nancyfx allows you to avail a wide range of plug-ins with additional and alternative functionality. The framework further builds requests and responses from the scratch, while keeping each request or response loosely coupled. Hence, you can easily customize Nancyfx and its components according to specific needs of each ASP.NET application.
Nancyfx is developed as an open source framework by the community, and distributed under the MIT license. You have option to download it from various sources, and access its source code without any restriction. Hence, you can easily customize Nancyfx according to the nature and requirements of each ASP.NET application.


Thursday, 26 January 2017

What is DevOps? What do we need to know?


According to TheAgileAdmin.com, ‘DevOps is a new term emerging from the collision of two major related trends. The first was also called “agile system administration” or “agile operations”; it sprang from applying newer Agile and Lean approaches to operations work.  The second is a much expanded understanding of the value of collaboration between development and operations staff throughout all stages of the development lifecycle when creating and operating a service, and how important operations has become in our increasingly service-oriented world.’
Some experts define DevOps as a culture, while others consider it as a practice or way of thinking. But the concept aims to create a reliable environment where a variety of software applications can be developed, tested and released rapidly and frequently. Also, DevOps requires enterprises to build a robust environment where software developers can communicate with system administrators, system engineers, database administrators, security professionals, release engineers and other IT professional without any restrictions and hindrance.
Understanding Important Aspects of DevOps
Primary Objective
DevOps aims to enhance the quality and user experience of software by combining the development and operations of an organization effectively. It aims to enhance the quality and user experience of a software application by facilitating constant and efficient communication between the development team and the operation team.  Also, DevOps focuses on the entire software development lifecycle (SDLC) to reduce time to market, get bugs or flaws in the software quickly, and reduce failure rates of new releases.
While adopting DevOps, an enterprise has to create a single team to handle both software development and operations. In the new environment, software developers will support common operational requirements like script deployment and load/performance testing from the initial stages of software development lifecycle.  Likewise, the non-programmers will support and provide feedback to the software developers consistently during the planning, development and deployment phase of the application.
Lifecycle
As noted earlier, the primary objective of DevOps is to make software development, software QA testing, deployment, and release processes more efficient by unifying the development and operations teams. Also, DevOps enable enterprises to take advantage of latest technologies like virtual machines and cloud infrastructure. Hence, DevOps lifecycle is completely different from conventional project management methods and techniques. It further aims to create a rapid release cycle complemented by a strong feedback loop.
Hence, DevOps emphasizes on infrastructure automation, deployment automation, infrastructure monitoring, configuration management, log management, and application performance monitoring and management. DevOps lifecycle further make it easier for professionals to focus on more important tasks by automating routine and repetitive tasks. The automation further makes the production environment standardized and software development predictable. At the same time, an enterprise can use the right tools to build, test, deploy, deliver and manage software applications rapidly.
DevOps Toolchain
DevOps further requires both enterprises and professionals to make software development and delivery process more efficient by using a set of tools. The DevOps toolchain includes a variety of tools to simplify and effectuate various aspects of software development and delivery. The DevOps toolchain includes tools for application code development and review, version control, software testing, package management, software release management, infrastructure configuration and management, and monitoring application performance and user experience. However, the enterprises can always customize and set up DevOps toolchain according to their specific needs.
Benefits
An enterprise can always implement DevOps to accomplish a number of business and technical benefits. It can make the operating environment more stable by combining the development and operations team. The unification will further enable the business to deliver new features quickly, and maintain and manage the application easily. Likewise, the single environment will further help the enterprises to build a base of happy users by delivering software continuously and resolve problems immediately. At the same time, DevOps makes the software developers productive by enabling them to resolve production issues quickly, control the entire code delivery process, and stay involved in the entire software development lifecycle.
However, each enterprise has to focus on a number of factors and break several old practices to implement DevOps efficiently. In addition to picking the right DevOps toolchain, it also needs to follow some widely accepted DevOps principles and methods. Also, it is important for the business motivate each employee to collaborate and communicate with other members of the team continuously.