Wordpress Questions and Answers
1.Static v/s Dynamic Website Design
There are basically two main types of website - static and dynamic. A static site is one that is usually written in plain HTML and what is in the code of the page is what is displayed to the user. A dynamic site is one that is written using a server-side scripting language such as PHP
2. What is content management system (CMS)
A content management system (CMS) is a software application or set of related programs that are used to create and manage digital content. CMSes are typically used for enterprise content management (ECM) and web content management (WCM).
3. What is an API
API (Application Programming Interface) is a set of functions and procedures that allow the creation of applications which access the features or data of an operating system, application, or other service.
4. Posts vs. Pages (Key Differences)
Posts are timely vs. Pages are timeless.
Posts can be categorized vs. Pages are hierarchical.
5. What is a WordPress Plugin
A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress.
6. What is a WordPress Theme? What does they provide.
A WordPress theme provides all of the front end styling of your WordPress site.
Most WordPress themes provide:
the overall design or style of your site
font styling
colors
widget locations
page layouts (or templates)
styles for blog posts and blog archives
additional stylistic details
7. Difference between template and theme
A theme is a complete package of files to define the look & feel (& some functionality). A template is just one of the files that makes up a theme.
Custom Fields and Meta Boxes are essentially the same, they allow you to store extra data/information in the postmeta table in the database. The data is stored in a key/value pair. And are attached to the post or page by id. Using the add_post_meta function.
add_post_meta($ID, 'name_of_data_to_store', 'value_of_that_data');
The key difference is that Custom Fields are native to wordpress so each post/page has them built-in.
8. What is SEO?
Search engine optimization is a methodology of strategies, techniques and tactics used to increase the amount of visitors to a website by obtaining a high-ranking placement in the search results page of a search engine (SERP) -- including Google, Bing, Yahoo and other search engines.
9. Categories vs. Tags
Categories allowed for a broad grouping of post topics, but when you wanted to describe a post in more specific terms, more categories were required. That led to very long category lists inside the blog and very long lists in Categories Widgets.
Tags are similar to categories, but they are generally used to describe your post in more detail.
10. What is the difference between a framework and a library
A library is usually a piece of reusable code, you use for specific functionality. You access the library through an API for executing a specific function. For eg You use JDBC as the API to look up the library that deals with database connection, retrieval of data.
When you are speaking of Frameworks, it is more of a collection of libraries that can be accessed through an API. It also dictates the architecture your application works with,where you have to factor the code as per the framework and design.
11.What Actually Are Custom Post Types?
Custom Post Types are a new set of administrative options appearing along with the default post types such as Posts, Pages, Attachments etc. A Custom Post Type can store any type of information. It has a dedicated editor, media uploader and uses the existing WordPress table structure for ease in data management. The main advantage of creating custom post types using the WordPress API is that it equips itself well with existing themes and templates.
Custom Post Types help us to keep different types of posts in different buckets. It separates our regular posts from others.
12.What is the difference between email client and webmail?
Email clients
An email client is an application that runs on your own personal computer and it uses client-server architecture. This means that your email is sent from many clients to a central server, which then sends the message to the right email addresses. If you use Outlook (part of the Microsoft Office package) or Thunderbird (comes with the Firefox browser), you’re using email clients.
The good thing about email clients is that the emails are stored on your PC and you can access them much faster than when using webmail, and the fact that you don’t need to have an internet connection if you want to read emails you received can sometimes be a huge benefit.
Webmail
Webmail are web-based email accounts. Emails are operated from a website, and webmail allows users to access their email accounts as long as they have an internet connection. The biggest names in webmail services are Gmail, Hotmail and Yahoo mail, so if you use any of these, you’re using webmail.
One could say that in the world of email, there are two types of email: email clients and webmail. Whether you choose to use email clients or to use webmail, just have in mind that both methods are made for reading and sending emails, the difference is just in the way of accessing them.
13. What is difference between session and cookie in php?
A cookie is a piece of data stored on the client side. Data stored in session is stored on the server side, and the various sessions are identified by cookies. A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer.
14. PHP Code Example to Query a WordPress Post
Query the post with post id 26 and Show the title and the content.
<?php
$post_id = 26;
$queried_post = get_post($post_id);
$title = $queried_post->post_title;
echo $title;
echo $queried_post->post_content;
?>
15. How do I make custom query with WordPress to query a db?
<?php $wpdb->query('select * from my_plugin_table where foo = "bar"'); ?>
16. For what purpose the famous buddypress and whocommerce plugin used for? Have you used this plugin before to build the apps.
To build social networking and ecommerce site respectively. Yes
17. Differences between SOAP and REST web services.
SOAP is a protocol. REST is an architectural style.
SOAP stands for Simple Object Access Protocol. REST stands for REpresentational State Transfer.
SOAP can't use REST because it is a protocol. REST can use SOAP web services because it is a concept and can use any protocol like HTTP, SOAP.
SOAP uses services interfaces to expose the business logic. REST uses URI to expose business logic.
In Java JAX-WS is the java API for SOAP web services. In Java JAX-RS is the java API for RESTful web services.
SOAP defines standards to be strictly followed. REST does not define too much standards like SOAP.
SOAP requires more bandwidth and resource than REST. REST requires less bandwidth and resource than SOAP.
SOAP defines its own security. RESTful web services inherits security measures from the underlying transport.
SOAP permits XML data format only. REST permits different data format such as Plain text, HTML, XML, JSON etc.
SOAP is less preferred than REST. REST more preferred than SOAP.
18. When is it best to use REST and Best to use SOAP?
Why Rest?
Since REST uses standard HTTP it is much simpler in just about ever way.
REST permits many different data formats where as SOAP only permits XML.
REST allows better support for browser clients due to it’s support for JSON.
REST has better performance and scalability. REST reads can be cached, SOAP based reads cannot be cached.
If security is not a major concern and we have limited resources. Or we want to create an API that will be easily used by other developers publicly then we should go with REST web services.
Why SOAP?
WS-Security: While SOAP supports SSL (just like REST) it also supports WS-Security which adds some enterprise security features.
WS-AtomicTransaction: Need ACID Transactions over a service, you’re going to need SOAP.
WS-ReliableMessaging: Rest doesn’t have a standard messaging system and expects clients to deal with communication failures by retrying.
SOAP is highly secure as it defines its own security.
If the security is a major concern and the resources are not limited then we should use SOAP web services. Like if we are creating a web service for banking related work then we should go with SOAP as here high security is needed.
18. What is XML RPC?
Both utilize XML for web service method request/response encapsulation. However, XML-RPC could be described as a subset of SOAP functionality. For protocol, XML-RPC can only make requests using an HTTP/S connection; meanwhile, SOAP commonly uses HTTP/S but it can be run over a variety of other protocols.
19. Difference between Native/Hybrid and HTML5 mobile web app
HTML5:
An HTML5 app is essentially a website with JavaScript code written to allow the app to perform dynamically, as opposed to a static website that you need to "refresh" to see the changes. It works interactively to make it feel like an "app", but it is running in a web browser, and is essentially a website, which (since it looks like your focus is mobile) will support multiple viewports or screen sizes so that it works well on mobile. Because it is running in a browser, it is confined to what is known is the browser sandbox, which is a limitation on what the app is capable of doing with the system hardware. It can only support features which are permissible inside the sandbox. This is done for security reasons.
Native:
A native app is an app written to a specific platform like iOS or Android, where the app is written in the language used for development on that platform (Objective-C and Java in this case). The portability of the code to other platforms depends on how it was written (if portability was in the developer's mind), but will always require some level of rewriting to use on another platform. When you write native, you get access to all the hardware features exposed by the native code APIs, which is typically most of the functionality of the device, definitely more than a web app. Apple push notifications is one example from your list that is an iOS specific feature which is not supported by a web app. It is "Native" because the code you write is essentially written for that platform, it is built for the native architecture of that device (implicitly implying that cross-platform support might be an area of concern, and it is).
Hybrid:
A hybrid app is a web app that is deployed to a native platform like iPhone inside a native harness. This harness is usually little more than a browser view (to display the HTML5 content) and some other hooks to allow your web app to potentially access some more hardware features that are not available inside the browser sandbox. It improves code portability because if you want to port your app to another platform, you only need a native harness on that other platform to run it, the HTML5 content of the app is directly portable. These harnesses can be hand written, but can also be generated automatically by tools in the marketplace like the much lauded PhoneGap. These tools try and make a single point of contact for the developer, who can then turn around and push their app out to multiple platforms quickly by generating the harness and packages required to do so automatically. This sounds powerful, and it is, but clearly the PhoneGap people have a ton of configurations and hardware to support, and thus, the solutions do not always work the same across all devices, and in practice, testing and hacking of special cases will be required by the developer to get proper support if the app is anything more than a website in a browser control.
20. What is a feed URL?
RSS Feeds are used by feed readers like Feedly, iTunes, and other services to check websites for new content. When you publish content on your site, your RSS feed automatically updates, formatting the new content as a .xml file so it can be read by external services and RSS readers.
No comments:
Post a Comment