Keeping Sites Safer

Version 5.2 of WordPress, named “Jaco” in honor of renowned and revolutionary jazz bassist Jaco Pastorius, is available for download or update in your WordPress dashboard. New features in this update make it easier than ever to fix your site if something goes wrong.

There are even more robust tools for identifying and fixing configuration issues and fatal errors. Whether you are a developer helping clients or you manage your site solo, these tools can help get you the right information when you need it.

Site Health Check

Building on the Site Health features introduced in 5.1, this release adds two new pages to help debug common configuration issues. It also adds space where developers can include debugging information for site maintainers.

PHP Error Protection

This administrator-focused update will let you safely fix or manage fatal errors without requiring developer time. It features better handling of the so-called “white screen of death,” and a way to enter recovery mode,  which pauses error-causing plugins or themes.

Improvements for Everyone

Accessibility Updates

A number of changes work together to improve contextual awareness and keyboard navigation flow for those using screen readers and other assistive technologies.

New Dashboard Icons

Thirteen new icons including Instagram, a suite of icons for BuddyPress, and rotated Earth icons for global inclusion. Find them in the Dashboard and have some fun!

Plugin Compatibility Checks

WordPress will now automatically determine if your site’s version of PHP is compatible with installed plugins. If the plugin requires a higher version of PHP than your site currently uses, WordPress will not allow you to activate it, preventing potential compatibility errors.

Developer Happiness

PHP Version Bump

The minimum supported PHP version is now 5.6.20. As of WordPress 5.2*, themes and plugins can safely take advantage of namespaces, anonymous functions, and more!

Privacy Updates

A new theme page template, a conditional function, and two CSS classes make designing and customizing the Privacy Policy page easier.

New Body Hook

5.2 introduces a wp_body_open hook, which lets themes support injecting code right at the beginning of the <body> element.

Building JavaScript

With the addition of webpack and Babel configurations in the wordpress/scripts package, developers won’t have to worry about setting up complex build tools to write modern JavaScript.

According to the latest TIOBE Programming Community Index, Python is one of the top 10 popular programming languages of 2017. Python is a general purpose and high level programming language. You can use Python for developing desktop GUI applications, websites and web applications. Also, Python, as a high level programming language, allows you to focus on core functionality of the application by taking care of common programming tasks. The simple syntax rules of the programming language further makes it easier for you to keep the code base readable and application maintainable. There are also a number of reasons why you should prefer Python to other programming languages.

 

7 Reasons Why You Must Consider Writing Software Applications in Python

1) Readable and Maintainable Code

While writing a software application, you must focus on the quality of its source code to simplify maintenance and updates. The syntax rules of Python allow you to express concepts without writing additional code. At the same time, Python, unlike other programming languages, emphasizes on code readability, and allows you to use English keywords instead of punctuations. Hence, you can use Python to build custom applications without writing additional code. The readable and clean code base will help you to maintain and update the software without putting extra time and effort.

2) Multiple Programming Paradigms

Like other modern programming languages, Python also supports several programming paradigm. It supports object oriented and structured programming fully. Also, its language features support various concepts in functional and aspect-oriented programming. At the same time, Python also features a dynamic type system and automatic memory management. The programming paradigms and language features help you to use Python for developing large and complex software applications.

3) Compatible with Major Platforms and Systems

At present, Python is supports many operating systems. You can even use Python interpreters to run the code on specific platforms and tools. Also, Python is an interpreted programming language. It allows you to you to run the same code on multiple platforms without recompilation. Hence, you are not required to recompile the code after making any alteration. You can run the modified application code without recompiling and check the impact of changes made to the code immediately. The feature makes it easier for you to make changes to the code without increasing development time.

4) Robust Standard Library

Its large and robust standard library makes Python score over other programming languages. The standard library allows you to choose from a wide range of modules according to your precise needs. Each module further enables you to add functionality to the Python application without writing additional code. For instance, while writing a web application in Python, you can use specific modules to implement web services, perform string operations, manage operating system interface or work with internet protocols. You can even gather information about various modules by browsing through the Python Standard Library documentation.

5) Many Open Source Frameworks and Tools

As an open source programming language, Python helps you to curtail software development cost significantly. You can even use several open source Python frameworks, libraries and development tools to curtail development time without increasing development cost. You even have option to choose from a wide range of open source Python frameworks and development tools according to your precise needs. For instance, you can simplify and speedup web application development by using robust Python web frameworks like Django, Flask, Pyramid, Bottle and Cherrypy. Likewise, you can accelerate desktop GUI application development using Python GUI frameworks and toolkits like PyQT, PyJs, PyGUI, Kivy, PyGTK and WxPython.

6) Simplify Complex Software Development

Python is a general purpose programming language. Hence, you can use the programming language for developing both desktop and web applications. Also, you can use Python for developing complex scientific and numeric applications. Python is designed with features to facilitate data analysis and visualization. You can take advantage of the data analysis features of Python to create custom big data solutions without putting extra time and effort. At the same time, the data visualization libraries and APIs provided by Python help you to visualize and present data in a more appealing and effective way. Many Python developers even use Python to accomplish artificial intelligence (AI) and natural language processing tasks.

7) Adopt Test Driven Development

You can use Python to create prototype of the software application rapidly. Also, you can build the software application directly from the prototype simply by refactoring the Python code. Python even makes it easier for you to perform coding and testing simultaneously by adopting test driven development (TDD) approach. You can easily write the required tests before writing code and use the tests to assess the application code continuously. The tests can also be used for checking if the application meets predefined requirements based on its source code.

However, Python, like other programming languages, has its own shortcomings. It lacks some of the built-in features provided by other modern programming language. Hence, you have to use Python libraries, modules, and frameworks to accelerate custom software development. Also, several studies have shown that Python is slower than several widely used programming languages including Java and C++. You have to speed up the Python application by making changes to the application code or using custom runtime. But you can always use Python to speed up software development and simplify software maintenance.

PHP 7 – All Set to Enhance and Accelerate The Web Performance This October
18 Apr

All technology giants and developers are desperately awaiting the release of PHP 7. It is expected to be bundled with some stunning features that not only doubles the performance but also enriches the user experience. Developers can make sure that we will see 360 degree change in performance and speed. With version 7, PHP should receive a JIT engine, which can dynamically compile Zend opcodes into a native machine code, engine improvements, lower memory usage, native local thread storage, language compatibility and much more.

Let’s look at some of the major changes and features we are expecting in PHP7.

1- Standalone Multi thread Web Server

Having standalone multi-thread server might not be in PHP 7 version but it can be expected in higher version that would surely make PHP more scalable. A multi-threading Web server can handle many simultaneous requests using a single database, thus save memory. PHP 7 will reduce the need for servers and make it a great choice environmentally.

2- Performance Improvements

The main purpose of PHPNG was to bring performance improvements that could be mapped with the features that Facebook HHVM provides. Zeev Suraski of Zend has written an article in which he openly admits that they treat HHVM as a competitor of (the Zend Engine based) PHP. In the article Zeev demonstrates how far PHPNG branch has evolved in terms of performance improvements.

3- (Just in time) JIT Engine

A JIT engine can dynamically compile Zend opcodes into native machine code that eventually would make the code run faster next time it is run and improve performance. It is certainly in the plans of Zend to allow bringing a JIT engine to PHP 7, according to Zeev Suraskiit.

4- AST: Abstract Syntax Tree

Nikita Popov proposed the introduction of an Abstract Syntax Tree (AST) in PHP compilation process that would support the PHPNG branch. Few advantages of using Abstract Syntax Tree (AST) are:

  • The potential for more optimizations that would make PHP run even faster
  • Open space for more interesting tools like static code analyzers which are often useful to detect bugs
  • Maintainable parser and compiler and better code quality

5- Asynchronous Programming

This feature would allow implementing and execution of parallel tasks within the same request. thus pushing PHP performance improvement potential to a different level. New PHP code needs to be written to take advantage of the asynchronous programming potential. Julien Pauli explained the asynchronous programming factors, refactoring PHP I/O multiplexing layer.

Check out latest info-graphics showing all the information about new PHP 7 versions:

When to expect PHP 7 Release Date?

The release date is not yet confirmed, but the initial versions release can be expected in mid October 2015 as mentioned in Wikipedia, and later we can expect its further versions.

Do you like this latest PHP development posts? Is there anything else you’d like to see happening in the PHP language in future? Let us know through your comments, what do you think about upcoming PHP 7.

How to create PowerPoint file using PHP.
13 Apr
Introduction:

One has to mostly deal with  requirement of exporting data to Excel, Word or PDF. Whereas, requirement of exporting data to PowerPoint slides remains as moon in daylight – elusive. Here, We will make ourselves familiar with PowerPoint generation concept using PHP PowerPoint library. Which is available on http://phppowerpoint.codeplex.com/.

Steps to Setup:
  • Download zip version of library from http://phppowerpoint.codeplex.com/releases/view/26621
  • Extract it and place it to root folder of your Project.
  • After extracting folder you will find three sub folders – namely ‘Classes’,’ Documentation’ and ‘Tests’.
    • Classes folder contains all magic code to library.
    • Test folder holds Sample code for taking first step towards this unknown world.
    • Documentation folder has API information.
  • Include reference of library by setting up path to library using following two line of code in top of your business logic file from where you are going to start writing your logic.
set_include_path(get_include_path() . PATH_SEPARATOR . ‘../Classes/’);

include ‘PHPPowerPoint.php’;
include ‘PHPPowerPoint/IOFactory.php’;

Then after, Place below code to start with simple slide.
$objPHPPowerPoint = new PHPPowerPoint();

// block sets slide logo.
$currentSlide = $objPHPPowerPoint->getActiveSlide();
$shape = $currentSlide->createDrawingShape();
$shape->setName(‘PHPPowerPoint logo’);
$shape->setDescription(‘PHPPowerPoint logo’);
$shape->setPath(‘./images/phppowerpoint_logo.gif’);
$shape->setHeight(36);
$shape->setOffsetX(10);
$shape->setOffsetY(10);
$shape->getShadow()->setVisible(true);
$shape->getShadow()->setDirection(45);
$shape->getShadow()->setDistance(10);
// block sets slide logo ends.

// block sets text for first slide.
$shape = $currentSlide->createRichTextShape();
$shape->setHeight(300);
$shape->setWidth(600);
$shape->setOffsetX(170);
$shape->setOffsetY(180);
$shape->getAlignment()->setHorizontal( PHPPowerPoint_Style_Alignment::HORIZONTAL_CENTER );
$textRun = $shape->createTextRun(‘Thank you for using PHPPowerPoint!’);
$textRun->getFont()->setBold(true);
$textRun->getFont()->setSize(60);
$textRun->getFont()->setColor( new PHPPowerPoint_Style_Color( ‘FFC00000’ ) );
// block sets text for first slide ends.

$filename = str_replace(‘.php’, ‘.pptx’, __FILE__);
$newname = “PresentationReport-” . date(‘Y-m-d-H-i-s’) . “.pptx”;
$objWriter = PHPPowerPoint_IOFactory::createWriter($objPHPPowerPoint, ‘PowerPoint2007’);
$objWriter->save(str_replace(‘.php’, ‘.pptx’, __FILE__));

// block to download file.
header(“Pragma: no-cache”);
header(“Expires: 0”);
header(“Cache-Control: must-revalidate, post-check=0, pre-check=0”);
header(“Content-Type: application/force-download”);
header(“Content-Type: application/octet-stream”);
header(“Content-Type: application/download”);
header(“Content-Disposition: attachment;filename=” . $newname);
ob_clean();
flush();
readfile($filename);
exit();
// ends.

Source of Inspiration:
http://phppowerpoint.codeplex.com/

Contributors: Monil Patel / Hardik Deliwala.

 

6 Reasons to Choose Laravel PHP Framework for Web Development
18 Feb

Are you planning to start a new web development project on the PHP platform? Within the framework there are many platforms to chose from that have different features and functionalities. If you are a developer then you must have heard about Laravel, if not, this blog will give you useful insights and six strong reasons to adopt it for your development project.

What is Laravel?

As a PHP framework, Laravel is an open source web development platform. What sets it apart is the expressive and elegant syntax that has been designed to ease and speed up the web development process. The platform has a vibrant developers’ community support and powerful features too. Described below are 6 Reasons to Choose Laravel PHP Framework for Web Development

1. Emerging Quickly: Many PHP development companies have adopted Laravel due to its dynamic capabilities to handle big web development projects. According to Google trends, Laravel is the most popular PHP framework among the developers. Check out these trends comparison among latest web development PHP frameworks.

2. Open Source: It is an open-source PHP web application framework, that makes it free and has easy process for building complex and large web applications with code maintainability.

3. Template engine: Laravel has lightweight templates with which you can create amazing layouts with dynamic content seeding. It has many widgets having JS and CSS code with solid structures. The templates of these frameworks are designed for simple webpage layout with different sections.

4. Modular: Laravel is built on more than 20 different libraries and is itself split up into individual modules. It has adopted modern PHP principles, which allows developers to build modular, responsive and user-friendly web apps.

5. MVC Architecture Support: It follows the MVC pattern, ensuring transparency between logic and presentation. This architecture improves performance, allows better documentation, and has multiple built-in functions.

6. Libraries and configuration: It supports many development environments and adjusts itself based on the appropriate platform where app is running. All this is possible because of the authorization libraries integrated inside. Laravel libraries are supported by auto complete features which are not found in other popular PHP frameworks.

If you are a developer and want to learn more about this framework then visit and join Laravel developers community. Don’t miss a chance to impress clients with your work using the latest PHP development technology – Laravel! SA specializes in responsive website development based on PHP. Get in touch for your next project.