Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Events
Videos
Audiobooks
Packt Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds

How-To Tutorials

7019 Articles
article-image-troubleshooting-openvpn-2-configurations
Packt
21 Feb 2011
10 min read
Save for later

Troubleshooting OpenVPN 2: Configurations

Packt
21 Feb 2011
10 min read
OpenVPN 2 Cookbook 100 simple and incredibly effective recipes for harnessing the power of the OpenVPN 2 network Set of recipes covering the whole range of tasks for working with OpenVPN The quickest way to solve your OpenVPN problems! Set up, configure, troubleshoot and tune OpenVPN Uncover advanced features of OpenVPN and even some undocumented options Introduction The topic of this article is troubleshooting OpenVPN. This article will focus on troubleshooting OpenVPN misconfigurations. The recipes in this article will therefore deal first with breaking the things. We will then provide the tools on how to find and solve the configuration errors. Some of the configuration directives used in this article have not been demonstrated before, so even if you are not interested in breaking things this article will still be insightful. Cipher mismatches In this recipe, we will change the cryptographic ciphers that OpenVPN uses. Initially, we will change the cipher only on the client side, which will cause the initialization of the VPN connection to fail. The primary purpose of this recipe is to show the error messages that appear, not to explore the different types of ciphers that OpenVPN supports. Getting ready Install OpenVPN 2.0 or higher on two computers. Make sure the computers are connected over a network. Set up the client and server certificates. For this recipe, the server computer was running CentOS 5 Linux and OpenVPN 2.1.1. The client was running Fedora 13 Linux and OpenVPN 2.1.1. Keep the server configuration file basic-udp-server.conf (download code, ch:2) and the client configuration file basic-udp-client.conf at hand. How to do it... Start the server using the configuration file basic-udp-server.conf: [root@server]# openvpn --config basic-udp-server.conf Next, create the client configuration file by appending a line to the basic-udp-client.conf file: cipher CAST5-CBC Save it as example7-1-client.conf. Start the client, after which the following message will appear in the client log: [root@client]# openvpn --config example7-1-client.conf ... WARNING: 'cipher' is used inconsistently, local='cipher CAST5- CBC', remote='cipher BF-CBC' ... [openvpnserver] Peer Connection Initiated with server-ip:1194 ... TUN/TAP device tun0 opened ... /sbin/ip link set dev tun0 up mtu 1500 ... /sbin/ip addr add dev tun0 192.168.200.2/24 broadcast 192.168.200.255 ... Initialization Sequence Completed ... Authenticate/Decrypt packet error: cipher final failed And, similarly, on the server side: ... client-ip:52461 WARNING: 'cipher' is used inconsistently, local='cipher BF-CBC', remote='cipher CAST5-CBC' ... client-ip:52461 [openvpnclient1] Peer Connection Initiated with openvpnclient1:52461 ... openvpnclient1/client-ip:52461 Authenticate/Decrypt packet error: cipher final failed ... openvpnclient1/client-ip:52461 Authenticate/Decrypt packet error: cipher final failed The connection will not be successfully established, but it will also not be disconnected immediately. How it works... During the connection phase, the client and the server negotiate several parameters needed to secure the connection. One of the most important parameters in this phase is the encryption cipher, which is used to encrypt and decrypt all the messages. If the client and server are using different ciphers, then they are simply not capable of talking to each other. By adding the following configuration directive to the server configuration file, the client and the server can communicate again: cipher CAST5-CBC There's more... OpenVPN supports quite a few ciphers, although support for some of the ciphers is still experimental. To view the list of supported ciphers, type: $ openvpn --show-ciphers This will list all ciphers with both variables and fixed cipher length. The ciphers with variable cipher length are very well supported by OpenVPN, the others can sometimes lead to unpredictable results. TUN versus TAP mismatches A common mistake when setting up a VPN based on OpenVPN is the type of adapter that is used. If the server is configured to use a TUN-style network but a client is configured to use a TAP-style interface, then the VPN connection will fail. In this recipe, we will show what is typically seen when this common configuration error is made. Getting ready Install OpenVPN 2.0 or higher on two computers. Make sure the computers are connected over a network. Set up the client and server certificates (Download code-ch:2 here). For this recipe, the server computer was running CentOS 5 Linux and OpenVPN 2.1.1. The client was running Fedora 13 Linux and OpenVPN 2.1.1. Keep the server configuration file basic-udp-server.conf (Download code-ch:2 here) and the client configuration file basic-udp-client.confat hand. How to do it... Start the server using the configuration file basic-udp-server.conf: [root@server]# openvpn --config basic-udp-server.conf Next, create the client configuration: client proto udp remote openvpnserver.example.com port 1194 dev tap nobind ca /etc/openvpn/cookbook/ca.crt cert /etc/openvpn/cookbook/client1.crt key /etc/openvpn/cookbook/client1.key tls-auth /etc/openvpn/cookbook/ta.key 1 ns-cert-type server Save it as example7-2-client.conf. Start the client [root@client]# openvpn --config example7-2-client.conf The client log will show: ... WARNING: 'dev-type' is used inconsistently, local='dev-type tap', remote='dev-type tun' ... WARNING: 'link-mtu' is used inconsistently, local='link-mtu 1573', remote='link-mtu 1541' ... WARNING: 'tun-mtu' is used inconsistently, local='tun-mtu 1532', remote='tun-mtu 1500' ... [openvpnserver] Peer Connection Initiated with server-ip:1194 ... TUN/TAP device tap0 opened ... /sbin/ip link set dev tap0 up mtu 1500 ... /sbin/ip addr add dev tap0 192.168.200.2/24 broadcast 192.168.200.255 ... Initialization Sequence Completed At this point, you can try pinging the server, but it will respond with an error: [client]$ ping 192.168.200.1 PING 192.168.200.1 (192.168.200.1) 56(84) bytes of data. From 192.168.200.2 icmp_seq=2 Destination Host Unreachable From 192.168.200.2 icmp_seq=3 Destination Host Unreachable From 192.168.200.2 icmp_seq=4 Destination Host Unreachable How it works... A TUN-style interface offers a point-to-point connection over which only TCP/IP traffic can be tunneled. A TAP-style interface offers the equivalent of an Ethernet interface that includes extra headers. This allows a user to tunnel other types of traffic over the interface. When the client and the server are misconfigured, the expected packet size is different: ... WARNING: 'tun-mtu' is used inconsistently, local='tun-mtu 1532', remote='tun-mtu 1500' This shows that each packet that is sent through a TAP-style interface is 32 bytes larger than the packets sent through a TUN-style interface. By correcting the client configuration, this problem is resolved. Compression mismatches OpenVPN supports on-the-fly compression of the traffic that is sent over the VPN tunnel. This can improve the performance over a slow network line, but it does add a little overhead. When transferring uncompressible data (such as ZIP files), the performance actually decreases slightly. If the compression is enabled on the server but not on the client, then the VPN connection will fail. Getting ready Install OpenVPN 2.0 or higher on two computers. Make sure the computers are connected over a network. Set up the client and server certificates. For this recipe, the server computer was running CentOS 5 Linux and OpenVPN 2.1.1. The client was running Fedora 13 Linux and OpenVPN 2.1.1. Keep the server configuration file basic-udp-server.conf (Download code-ch:2 here) and the client configuration file basic-udp-client.confat hand.. How to do it... Append a line to the server configuration file basic-udp-server.conf: comp-lzo Save it as example7-3-server.conf. Start the server: [root@server]# openvpn --config example7-3-server.conf Next, start the client: [root@client]# openvpn --config basic-udp-client.conf The connection will initiate but when data is sent over the VPN connection, the following messages will appear: Initialization Sequence Completed ... write to TUN/TAP : Invalid argument (code=22) ... write to TUN/TAP : Invalid argument (code=22) How it works... During the connection phase, no compression is used to transfer information between the client and the server. One of the parameters that is negotiated is the use of compression for the actual VPN payload. If there is a configuration mismatch between the client and the server, then both the sides will get confused by the traffic that the other side is sending. With a network fully comprising OpenVPN 2.1 clients and an OpenVPN 2.1 server, this can be fixed for all the clients by just adding another line: push "comp-lzo" There's more... OpenVPN 2.0 did not have the ability to push compression directives to the clients. This means that an OpenVPN 2.0 server does not understand this directive, nor do OpenVPN 2.0 clients. So, if an OpenVPN 2.1 server pushes out this directive to an OpenVPN 2.0 client, the connection will fail. Key mismatches OpenVPN offers extra protection for its TLS control channel in the form of HMAC keys. These keys are exactly the same as the static "secret" keys used in point-to-point style networks. For multi-client style networks, this extra protection can be enabled using the tls-auth directive . If there is a mismatch between the client and the server related to this tls-auth key , then the VPN connection will fail to get initialized. Getting ready Install OpenVPN 2.0 or higher on two computers. Make sure the computers are connected over a network. Set up the client and server certificates using the first recipe. For this recipe, the server computer was running CentOS 5 Linux and OpenVPN 2.1.1. The client was running Fedora 13 Linux and OpenVPN 2.1.1. Keep the server configuration file basic-udp-server.conf (Download code-ch:2 here) and the client configuration file basic-udp-client.conf at hand. How to do it... Start the server using the configuration file basic-udp-server.conf: [root@server]# openvpn --config basic-udp-server.conf Next, create the client configuration: client proto udp remote openvpnserver port 1194 dev tun nobind ca /etc/openvpn/cookbook/ca.crt cert /etc/openvpn/cookbook/client1.crt key /etc/openvpn/cookbook/client1.key tls-auth /etc/openvpn/cookbook/ta.key ns-cert-type server Note the lack of the second parameter for tls-auth. Save it as example7-4-client.conf file. Start the client: [root@client]# openvpn --config example7-4-client.conf The client log will show no errors, but the connection will not be established either. In the server log we'll find: ... Initialization Sequence Completed ... Authenticate/Decrypt packet error: packet HMAC authentication failed ... TLS Error: incoming packet authentication failed from client- ip:54454 This shows that the client openvpnclient1 is connecting using the wrong tls-auth parameter and the connection is refused. How it works... At the very first phase of the connection initialization, the client and the server verify each other's HMAC keys. If an HMAC key is not configured correctly, then the initialization is aborted and the connection will fail to establish. As the OpenVPN server is not able to determine whether the client is simply misconfigured or whether a malicious client is trying to overload the server, the connection is simply dropped. This causes the client to keep listening for the traffic from the server, until it eventually times out. In this recipe, the misconfiguration consisted of the missing parameter 1 behind: tls-auth /etc/openvpn/cookbook/ta.key The second parameter to the tls-auth directive is the direction of the key. Normally, the following convention is used: 0: from server to client 1: from client to server This parameter causes OpenVPN to derive its HMAC keys from a different part of the ta.key file. If the client and server disagree on which parts the HMAC keys are derived from, the connection cannot be established. Similarly, when the client and server are deriving the HMAC keys from different ta.key files, the connection can also not be established.
Read more
  • 0
  • 0
  • 26252

article-image-setting-oracle-order-management
Packt
21 Feb 2011
4 min read
Save for later

How to set up Oracle Order Management

Packt
21 Feb 2011
4 min read
In order to set up Oracle Order Management, there are some mandatory and optional steps. Most of the information that is required while setting up Oracle Order Management is shared through other modules. Some common features include the following: Inventory organization Key and descriptive Flexfields Unit Of Measure (UOM) Price list Customer Picking rules System options System options are the key values that are used for setting up Oracle Order Management Suite. These parameters contain a list of values that should be used as per our business requirement. We can see some common parameter values in the following figure: Profile options Profile options are the system profiles that we assign as per our requirement. These profiles fulfill critical business requirements. We can use these profiles on four different levels, as follows: Site Application Responsibility User Document sequence Document sequence is used for generating sequential number for orders. Using the document sequence an automatic document sequence number will be generated. These document numbers are user defined. We can identify from where new document sequencing should take place and where it is going to end. Also, we can have a unique number sequence for a particular time period. Using the document sequence, we differentiate our document sequencing for sales order documents. We can assign these document sequences to particular transaction types. Each transaction type has its own document sequence numbering. In the Name field, we will give a unique name for the number sequence. Select the application for which the document sequence will be working, and enter start and finish dates from when to when this sequence will be applicable. If we want to keep this document sequence for an unspecified period, then we will keep the To field blank. For automatic number generation, select the Type as Automatic. For the assignment of the document sequence, we will again select Order Management in Application field, which we have selected at the time of defining the new sequence. In the Category field, we will select the order type for which we require the document sequence. In the Ledger field, select the ledger and select Automatic in the Method Type field. Under the Assignment tab, we will again select the sequence that should be used for the transaction type and the Start Date from when this template would be applicable. Transaction type We use transaction types to manage different types of sales order. These transaction types can be according to business requirements (how we want to differentiate our orders). There are various options for which we can classify a new transaction type, as follows: Export sales Local sales Territory-based Price-based Workflows are assigned to transaction types. We can assign price lists, payment terms, invoicing rules, and the inventory organization from where the items against the order would be picked and shipped. To create a new transaction type in Oracle Order Management, navigate to Setup | Transaction Types. Here we will give the name of the new transaction type such as Standard Order Type and so on. Now we will attach the Fulfillment Flow and Negotiation Flow to this transaction type. We will also assign an effective date to this transaction type in order to start working from that date. Also, we can assign the price list and the picking rule to this transaction type. Now under the Shipping tab, we will provide the information for the Warehouse from where the inventory should be picked. We can also leave that blank if we have specified that at the picking-rule level or we can specify that at the order-entry level. We can specify the FOB field. We can attach the transaction type freight terms, as well as specify the shipping method at Transaction Type level. Under the Finance tab, we enter information that would be required in Oracle Accounts Receivable at the time of invoice creation. We can also specify the account for Cost of Goods Sold (COGS) at the Transaction Type level; else we have the option to pick from the Inventory Organization. Invoice Source type will be the source type used for invoices interfaced to Accounts Receivable. We can also specify a particular invoicing rule for the transaction type.
Read more
  • 0
  • 0
  • 5105

article-image-how-set-ibm-lotus-domino-server
Packt
21 Feb 2011
3 min read
Save for later

How to Set Up IBM Lotus Domino Server

Packt
21 Feb 2011
3 min read
IBM Lotus Quickr 8.5 for Domino Administration Follow these steps to setup a Domino server: Clicking on the desktop icon for the Lotus Domino Server will start the setup process: After the splash screen goes away the setup process will begin, click on the Next button: (Move the mouse over the image to enlarge.) The first screen of the setup asks if this is the first server in the domain or will it be joining an existing Domino domain: We will be adding this server into an existing domain for the purpose of this illustration. Click on the Next button to continue: Now you will need to locate the server ID file you created for this new server. Click on the Browse button to locate the file, then click on the Next button: Once you have selected the ID, the setup program recognizes the defined Domino name for the server. Click on Next to continue: Select the services required for this Domino server, that will be running Quickr. You can then click on Customize to review other Domino services: Next you can configure your ports and set a hostname (which should be the fully qualified domain name) by clicking on Customize: As seen in the following screenshot, you can disable NetBIOS if it is not required in your network. You should also check the boxes to encrypt and compress network traffic and enter the fully qualified domain name of the server. These settings will be incorporated into the server document, which is in the directory. Click on OK to go back to the previous screen and see your changes. Verify your settings and then click on Next to continue the setup process. Now name the primary Domino server, that has the directory you want the new server to be using. Enter the Domino name or you may enter the IP address or the fully qualified name. Click on the Next button when you are ready to move forward: Next you will need to select the option to set the server to use the directory as a Primary directory and then click on Next to continue. The setup process now asks if you want it to set some security related items automatically. Leave both options checked and click on the Next button: Finally, review the options which you have selected and if you are happy, click on Setup to complete the setup of the Domino server: You should see a pop up window similar to the following one during this process: Once completed, you will receive the Congratulations message, click on the Finish button.  
Read more
  • 0
  • 0
  • 3569

article-image-ibm-websphere-application-server-security-threefold-view
Packt
21 Feb 2011
8 min read
Save for later

IBM WebSphere Application Server Security: A Threefold View

Packt
21 Feb 2011
8 min read
  IBM WebSphere Application Server v7.0 Security Secure your IBM WebSphere applications with Java EE and JAAS security standards using this book and eBook Imagine yourself at an athletic event. Hey! No, no-you are at the right place. Yes, this is a technical article. Just bear with me for a minute. Well, now that the little misunderstanding is out of the way let's go back to the beginning. The home crowd is really excited about the performance of its team. However, that superb performance has not been yet reflected on the scoreboard. When finally that performance pays off with the long-waited score, 'it' happens! The score gets called off. It is not at all unlikely that a controversial call would be made, or worse yet, not made! Or so we think. There is a group of players and fans of the team that just scored that 'see' the play as a masterpiece of athletic execution. Then there is another group, that of players and coaches of the visiting team who clearly see a violation to the rules just before the score. And there is a third group, the referees. Well, who knows what they see! The fact is that for the same action, there may be several perceptions of the same set of events. Albert Einstein and other scientists provided a great example of multi-perception with the wave-particle duality concept. In a similar fashion, a WebSphere based environment could be analyzed in a number of forms. None of the forms or views is absolutely correct or incorrect. Each view, however, helps to focus on the appropriate set of components and their relationships for a given situation or need. WebSphere Application Server technology is a long and complex subject. This article provides three WAS ND environment views, emphasizing security, which will help the reader connect individual security tasks to the big picture. One view aids the WebSphere administrator to relate isolated security tasks to the overall middleware infrastructure (for example, messaging systems, directory services, and backend databases to name a few). This is useful in possible interactions with teams responsible for such technologies. On the other hand, a second view helps the administrator to link specific security configuration tasks to a particular Enterprise Application (for example, EJB applications, Service Integration Bus, and many more) set of components. This view will help the administrator to relate to possible development team needs. The article also includes a third view, one that focuses on the J2EE technology stack as it relates to security. This view could help blend the former two views. Enterprise Application-Server infrastructure architecture view This article starts with the Application Server infrastructure architecture view. The actual order of each of these major article sub-sections is really unimportant. However, since it needs to be a beginning, the infrastructure architecture view is thus selected. A possibly more formal name for what it is desired to convey in this section would be the Enterprise J2EE Application server infrastructure architecture. In this way, the scope of technologies that make up the application-centric architecture is well defined as that pertaining to J2EE applications. Nevertheless, this type of architecture is not exclusive to a WebSphere Application Server Network Deployment environment. Well, it's not in a way. If the architecture does not mention specific implementations of a function, it is a generic view of the architecture. On the other hand, if the architecture view defines or includes specific branded technologies of a function (for example, IHS for a web server function), then it is a specialized architecture. The point is that other J2EE application server products not related to the WebSphere umbrella may use the same generic type of infrastructure architecture. Therefore, this view has to do with J2EE application servers and the enterprise infrastructure components needed to sustain such application servers in a way that they can host a variety of enterprise applications (also known as J2EE applications). The following diagram provides an example of a basic WebSphere Application Server infrastructure architecture topology: The use of multiple user registries is new in version 7.0 Simple infrastructure architecture characteristics The architecture is basic since it only shows the minimum infrastructure components needed by a WebSphere Application Server infrastructure to become functional. In this diagram, the infrastructure elements are presented as they relate to each other functionally. In other words, the diagram is generic enough that it only shows and identifies the components by their main function. For instance, the infrastructure diagram includes, among others, proxy and messaging servers. Nothing in the diagram implies the mapping of a given functional component to a specific physical element such as an OS server or a specialized appliance. Branded infrastructure elements The infrastructure architecture presented in the diagram depicts a WebSphere clustered environment. The only technologies identified by their brand are the IBM HTTP Server (IHS) web server component (represented by the two rectangles (light blue) labeled IHS) and the WebSphere Application Server (WAS) nodes (represented by the rectangles (green) labeled WAS). These two simple components offer a variety of architectural choices, such as: Hosting both components in a single OS host under a WAS node Host each component in their own OS host in the same sub-network (normally an intranet) Host each component in different OS hosts in different sub-network (normally a DMZ for the IHS and intranet for the WAS) The choice for a specific architecture will be made in terms of a variety of requirements for your environment, including security requirements. Generic infrastructure components The infrastructure diagram also includes a number of components that are only identified by their function but no information is provided as to the specific technology/product implementing the function. For instance, there are four shapes (light yellow) labeled DB, Messaging, Legacy Systems, and Service Providers. In your environment, there may be choices to make in terms of the specific component. Take for instance, the DB component. Identifying what DB server or servers will be part of the architecture is dependent on the type of database employed by the enterprise application being hosted. Some corporations limit the number of database types to less than a handful. Nevertheless, the objective of the WebSphere Administrator responsible for the environment is to identify which type of databases will be interfacing with the WAS environment. Once that fact is determined, the appropriate brand/product could be added to the architecture diagram. Other technologies/components that need to be identified in a similar way are the user registry (represented by the shape (light purple) labeled User Registry), the security access component (represented in the diagram by the oval (yellow) labeled Security Access). A common type of user registry used in WebSphere environments is an LDAP server. Furthermore, a popular security access product is SiteMinder (formerly by Netegrity, now offered by CA). The remaining group of elements in the architecture has the function to front-end the IHS/WAS environment in order to provide high availability and added security. Proxy servers may be used or not, depending on whether the IHS function can be brought to the DMZ in its own OS host. Specialized appliances offered by companies such as CISCO or F5 normally implement load balancers. However, some software products can be used to implement this function. An example to the latter is the IBM WebSphere Edge suite. In general, most corporations already own and use firewalls and load balancers; so for the WebSphere administrator, it is just a matter of integrating them to the WebSphere infrastructure. Using the infrastructure architecture view Some of the benefits of picturing your WebSphere environment using the infrastructure architecture view come from realizing the following important points: Identify the technology or technology choices to be used to implement a specific function. For instance, what type of user registry to use. An immediate result of the previous point is identifying the corporate group the WebSphere administrator would be working with in order to integrate (that is, configure) said technology and WebSphere. Once the initial architecture has been laid out, the WebSphere administrator will be responsible to identify the type of security involved to secure the interactions between the various infrastructure architecture components. For instance, what type of communication will take place between the IHS and the Security Access component, if any. What is the best way to secure the communication channel? How is the IHS component authenticated to the Security Access component?  
Read more
  • 0
  • 0
  • 4373

article-image-faqs-yui
Packt
18 Feb 2011
7 min read
Save for later

FAQs on YUI

Packt
18 Feb 2011
7 min read
  YUI 2.8: Learning the Library Develop your next-generation web applications with the YUI JavaScript development library Improve your coding and productivity with the YUI Library Gain a thorough understanding of the YUI tools Learn from detailed examples for common tasks         Read more about this book       (For more resources on Yui, see here.) Q: What is the YUI?A: The Yahoo! User Interface (YUI) Library is a toolkit packed full of powerful objects that enables rapid frontend GUI design for richly interactive web-based applications. The utilities provide an advanced layer of functionality and logic to your applications, while the controls are attractive pre-packed objects that we can drop onto a page and begin using with little customization. Q: Who is it for and who will it benefit the most?A: The YUI is aimed at and can be used by just about anyone and everyone, from single site hobbyists to creators of the biggest and best web applications around. Developers of any caliber can use as much or as little of it as they like to improve their site and to help with debugging. It's simple enough to use for those of you that have just a rudimentary working knowledge of JavaScript and the associated web design technologies, but powerful and robust enough to satisfy the needs of the most aspiring and demanding developers amongst you. Q: How do I install it?A: The simple answer is that you don’t. Both you, while developing and your users can load the components needed both from Yahoo! CDN and even from Google CDN across the world. The CDN (Content Delivery Network) is what the press nowadays calls ‘the cloud’ thus, your users are more likely to get a better performance loading the library from the CDN than from your own servers. However, if you wish, you can download the whole package either to take a deep look into it or serve it to your users from within your own network. You have to serve the library files yourself if you use SSL. Q: From where can one download the YUI Library?A: The YUI Library can be downloaded from the YUI homepage. The link can be found at http://developer.yahoo.com/yui/. Q: Are there any licensing restrictions for YUI?A: All of the utilities, controls, and CSS resources that make up the YUI have been publicly released, completely for free, under the open source BSD (Berkeley Software Distribution) license. This is a very unrestrictive license in general and is popular amongst the open source community. Q: Which version should I use?A: The YUI Library is currently provided in two versions, YUI2 and YUI3. YUI2 is the most stable version and there are no plans to discontinue it. In fact, the YUI Team is working on the 2.9 version, which will be the last major revision of the YUI2 code line and is to be released in the second half of 2011. The rest of this article will mostly refer to the YUI 2.8 release, which is the current one. The YUI3 code line is the newest and is much faster and flexible. It has been redesigned from the ground up with all the experience accumulated over 5 years of development of the YUI2 code line. At this point, it does not have such a complete set of components as the YUI2 version and many of those that do exist are in ‘beta’ status. If your target release date is towards the end of 2011, YUI3 is a better choice since by then, more components should be out of ‘beta’. The YUI team has also opened the YUI Gallery to allow for external contributions. YUI3, being more flexible, allows for better integration of third-party components thus, what you might not yet find in the main distribution might be already available from the YUI Gallery. Q: Does Yahoo! use the YUI Library? Do I get the same one?A: They certainly do! The YUI Library you get is the very same that Yahoo! uses to power their own web applications and it is all released at the same time. Moreover, if you are in a rush, you can also stay ahead of the releases (at your own risk) by looking at GitHub, which is the main life repository for both YUI versions. You can follow YUI’s development day by day. Q: How do I get support?A: The YUI Library has always been one of the best documented libraries available with good users guide and plenty of well explained examples besides the automated API docs. If that is not enough, you can reach the forums, which currently have over 7000 members with many very knowledgeable people amongst them, both from the YUI team and many power users. Q: What does the core of the YUI library do?A: What was then known as the ‘browser wars’, with several companies releasing their own set of features on the browsers, left the programming community with a set of incompatible features which made front-end programming a nightmare. The core utilities try to fix these incompatibilities by providing a single standard and predictable API and deal with each browser as needed. The core of the library consists of the following three files: YAHOO Global Object: The Global Object sets up the Global YUI namespace and provides other core services to the rest of the utilities and controls. It's the foundational base of the library and is a dependency for all other library components (except for the CSS tools). Dom utilities: The Dom utilities provide a series of convenient methods that make working with the Document Object Model much easier and quicker. It adds useful selection tools, such as those for obtaining elements based on their class instead of an ID, and smoothes out the inconsistencies between different browsers to make interacting with the DOM programmatically a much more agreeable experience. Event Utility: The Event Utility provides a unified event model that co-exists peacefully with all of the A-grade browsers in use today and offers a consistent method of accessing the event object. Most of the other utilities and controls also rely heavily upon the Event Utility to function correctly. Q: What are A-grade browsers?A: For each release, the YUI Library is thoroughly tested on a variety of browsers. This list of browsers is taken from Yahoo!’s own statistics of visitors to their sites. The YUI Library must work on all browsers with a significant number of users. The A-grade browsers are those that make up the largest share of users. Fortunately browsers come in ‘families’ (for example, Google’s Chrome and Apple’s Safari both use the WebKit rendering engine) thus, a positive result in one of them is likely to apply to all of them. Testing in Safari for Mac provides valid results for the Safari on Windows version, which is rarely seen. Those browsers are considered X-Grade, meaning, they haven’t been tested but they are likely to work fine. Finally, we have the C-grade browsers which are known to be obsolete and nor YUI nor any other library can really be expected to work on them. This policy is called Graded Browser Support and it is updated quarterly. It does not depend on the age of the browser but on its popularity, for example, IE6 is still in the A-grade list because it still has a significant share.
Read more
  • 0
  • 0
  • 3746

article-image-microsoft-sharepoint-2010-list-management
Packt
18 Feb 2011
6 min read
Save for later

Microsoft Sharepoint 2010: List Management

Packt
18 Feb 2011
6 min read
  Microsoft SharePoint 2010 End User Guide: Business Performance Enhancement Taking the basics to the business with no-coding solutions for SharePoint 2010 Designed to offer applicable, no-coding solutions to dramatically enhance the performance of your business Excel at SharePoint intranet functionality to have the most impact on you and your team Drastically enhance your End user SharePoint functionality experience Gain real value from applying out of the box SharePoint collaboration tools Packed with useful tips, images and instructions to help you to be more productive as a SharePoint 2010 End User         Read more about this book       (For more resources on Microsoft Sharepoint, see here.) The basics A SharePoint list is a collection of similar items that are defined by a set of structure columns or fields, resembling a database table. Lists support various field or data types, and can have workflow and alert triggers that react to events such as creating, updating, or deleting items. In addition, lists can be configured to filter, sort, or group items based on item data or properties, which is ideal for visualization of information to both display and edit item data. An ideal business use for a list is to store information that is normally managed in an Excel file, such as new orders, issue tracking of bugs on a project, or maintenance contracts. The advantages of storing information in a list rather than in Excel are: Multiple people can edit different line items of the information Read, write, and view permissions can be applied to the line items SharePoint business process functionality such as alerts and workflow can be applied to an item when it has been created or edited Information can be targeted to users with the use of views There is one version of the truth of the information There is nothing wrong with using Excel for database-storing activity, but a SharePoint list provides a richer user experience in terms of entering, managing, and taking actions from the data. Lists in SharePoint are based on list templates, such as calendars, contact lists, picture libraries, and others that define the scheme for new lists. You can create multiple lists, based on a single list template. Creating lists To create a list, click on Site Actions | More Options…: You will be presented with a series of out of the box List templates, each of which has a slightly different column names and views, but they all have the common List functionality. There is the ability to filter the displayed List templates with the navigational menu on the left-hand side. Once you have chosen your List, type in the List name and URL, and the List will be created. As best practice, avoid putting spaces in the name as shown in the preceding screenshot. Otherwise, this puts the %20 character in the actual URL of the list. For example, in the preceding screenshot, the generated SharePoint list URL would be /Lists/Project%20Annoucements/AllItems.aspx. SharePoint converts non-alphanumeric characters to URL-friendly characters. This whitespace can cause problems when the URL is being used with workflows or being pasted by a user into an e-mail as the URL may be truncated when the e-mail has been sent. Once a list or library has been created, the URL cannot be changed. You can always change the name and put in spaces in the name from the List settings. In the preceding screenshot, you can select More Options... to add a description to the list, or add the list to the Quick Launch navigation of the Site. Once a List is created, you will be automatically directed to the newly created list. List templates The SharePoint installation has provided many out of the box List Templates that are predefined, and will generally meet your needs with perhaps some minor enhancements by adding a few extra fields. For team collaboration, the out of the box list templates such as the Calendar and Discussion List Templates are available in most Site Templates and should be sufficient for your requirements. The Team Site template will probably meet most of your collaboration requirements as this site template has Shared Documents, Issue Tracking, Discussions and Announcements Lists, and Libraries. Out of the Box list templates As you architect a SharePoint deployment, it is important to know which List templates are available on which sites as this can affect deployment timelines. As your collaboration needs become more sophisticated and you become more familiar with SharePoint's functionality and user requirements, it is worth reviewing the following List Templates as these have specific functionality. When you are creating a list, its description is displayed on the top right-hand side of the page when the list icon is selected. This is a good way to learn the functionality of the available lists. In this section, the less intuitive functionality of lists is explained. External list This is a new list to SharePoint 2010 and is used to display Line of Business (LOB) data from an SQL database. We view this provided functionality as beyond end user activity as you will need to have knowledge of SharePoint Designer or Visual Studio to configure this kind of List to show data. Custom list This is a blank list with no fields or views. Use this list template if none of the built-in features of a list meet your criteria. It can be quicker to start a new custom list and add site columns and content types, rather than delete or change column names with an existing list template. Import Spreadsheet When this list is created, the columns and data from a spreadsheet are copied into it. The data import process from the spreadsheet only occurs when the list is created. Choose this list if you are migrating content from a spreadsheet into a list and all future data activity is intended to be performed in the SharePoint list. Calendar This is a calendar list of events. It is not a calendar of an individual's Outlook calendar, but a calendar that displays date values of a list. Typically, this type of list is used as a team calendar to track meeting dates or as a resource booking tool like a conference room or overhead projector. A typical business scenario of a calendar list could be for resource booking requests that require an approval process. Custom fields can be added to the list such as department and resource. With this business scenario, there can be a view to display categorized departments and a sub category of the requested resource, so there is the ability to identify which departments are making the requests and for what resources. An advantage a calendar list has over an Outlook calendar is that different views can be created to show list items in different formats. The calendar list can also be synchronized into Outlook.  
Read more
  • 0
  • 0
  • 2345
Unlock access to the largest independent learning library in Tech for FREE!
Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
Renews at $19.99/month. Cancel anytime
article-image-how-manage-content-list-microsoft-sharepoint
Packt
18 Feb 2011
12 min read
Save for later

How to Manage Content in a List in Microsoft Sharepoint

Packt
18 Feb 2011
12 min read
Microsoft SharePoint 2010 End User Guide: Business Performance Enhancement Taking the basics to the business with no-coding solutions for SharePoint 2010 Designed to offer applicable, no-coding solutions to dramatically enhance the performance of your business Excel at SharePoint intranet functionality to have the most impact on you and your team Drastically enhance your End user SharePoint functionality experience Gain real value from applying out of the box SharePoint collaboration tools Packed with useful tips, images and instructions to help you to be more productive as a SharePoint 2010 End User How to add, view, edit, and manage content to a list To perform these functions, the Ribbon can be the navigational method or you can click on the content itself. Either way is efficient; it is simply a personal preference. The Ribbon method To add a new item, click on the Items in List Tools and then click on the New Item shown in the following screenshot: If there is more than one content type in the list there will be additional items on the New Item on the ribbon. To view or edit an item, click the checkbox next to the list item and then click the View Item/Edit Item from the ribbon. List method To add an item, click Add new item located at the bottom of the list: Both methods will open a new form. For readers that are familiar with MOSS, the new form to edit or view an item opens as a pop up and it is not possible to obtain the URL or any parameters in the browser. Content can be added to the fields by clicking the Save button on the form and saving the entered information. To view or edit an item, click on the downward arrow on the item to display an item menu. Then, click on the View Item/ Edit Item to see the entire form. The downward arrow is only displayed when you hover your mouse over the item. Managing content In this section, you will learn how to manage content that is in a list. Managing content is about how to manipulate it so that it can be used for your business collaboration activities. The functionality to manage content can be navigated from the Ribbon. Alerts Alerts are notifications on list or library items that automatically notify users when new content is added, changed, or deleted. Alerts are useful in many business scenarios, such as: Content owners who are responsible for a listlibrary and need to unconsciously monitor user activity in it. For example, if you use a list as a bug tracker tool for a software release and have subscribed to receive alerts when a new item is created in the list and you are not receiving any alerts, the team is probably not testing the software release; so, you can proactively inquire with the team rather than wait until the next status meeting. An alert notification can be subscribed to on a single document, so if the requirements document changes you can be the first to know of this change. To avoid your e-mail inbox being inundated with alerts, create a folder in Outlook and create a rule to copy all received alerts to this folder. E-mail a link There is the ability to e-mail a link to the list to someone else by clicking on the E-mail a Link option on the Ribbon. This is often used by a user as an informal approval or review process with other team members. Rather than e-mailing an attachment, an e-mail link to the document in the library is better because the e-mail link will always link to the same file even if the file is resaved. We have observed that sometimes users are hesitant to use this SharePoint feature because they feel users will click on the link and edit the document and resave it in the list, thus overwriting the original document. This concern can be overcome by two approaches: Set the permissions on the document to read-only for the rest of the team. Check out the document prior to sending the link. Users will only be able to view the document in read-only mode. Managing Permissions The site permissions inheritance methodology is applied to lists. By clicking on the List Permissions icon on the Ribbon, you have the ability to Manage Parent Permission and Stop Inheriting Permissions. As with Site permission inheritance, there is the ability to manually break the inheritance of an item in a list. This can be done by clicking on the drop-down menu of an item and selecting Stop Inheriting Permissions in the Ribbon. You will be prompted with an information box, alerting you with what you are about to do. By breaking the inheritance of an item, list, or even a site, it creates a security administration overhead in which you would have to create unique permissions, and this can cause confusion with users and administrators. You can only manage permissions on the site, list, or item level. You cannot manage the permissions on a view in the list. RSS feeds RSS stands for Really Simple Syndication and is a web feed technology from blog entries, news headlines, audio, and video in a standardized, normally timely format. The benefit is that you can subscribe to different sources of information and aggregate the feeds into a single location, such as Outlook or another location on the SharePoint site. To create an RSS feed from a list, click on the RSS Feed on the Ribbon. Datasheet view The Datasheet View provides the ability to edit items in a list as if the list was an online spreadsheet. You can tab across fields, paste between them, and sort and filter columns. This is useful if you need to edit multiple items at once. To switch from a Standard view to a Datasheet view, click on the Datasheet icon on the Ribbon. In the Datasheet view, there is additional functionality available, featured in the following sections: Show Totals You can show the totals of each column in a list by clicking on the Show Totals icon on the Ribbon. The totals can be defined as Average, Count, Maximum, and Minimum. Adding columns To add a column to a list, click on Create Column on the Ribbon. Type in the column name, and select the column type. (Move the mouse over the image to enlarge.) Column typeDescriptionSingle line of textA single value column, such as a Full Name.Multiple lines of textText Description: This field format has rich text capabilities, such as bold, and font sizes similar to Word, so it is ideal for entries that would perhaps be in an e-mail or Word document. If version control is enabled on the list, there is also the ability to append text to a previous submission. This is useful when there is a dialog between multiple people.Choice (menu to choose from)Multiple Choice values: This is ideal when you require the fields to be predefined to the user. Also, if a view has categorized data in it, this column type should be used.Lookup (information already on this site)Look up information from another list on this site: This column type can be viewed as a relationship data structure-one to many. This is also useful when there are multiple lists using the same data.Person or GroupUser look up from Active Directory By using a user's name from Active Directory, additional information about the user can be obtained, such as their department and manager. Also, by using this column type, workflow notifications to the value can occur.Hyperlink or PictureURL address.Calculated (calculation based on other columns)Ability to select other columns in the list and perform calculations from these, such as the number of days between two dates.Full HTML content with formatting and constraints for publishingAbility for a column to display the contents of the HTML from an Editor Web Part. Snippets of HTML can be entered directly into the column.Image with formatting and constraints for publishingColumns that store links to images defined in the item properties. Each column displays an image, with proportional sizing. This field type renders an image to the correct size on a web page when it is loaded.Hyperlink with formatting and constraints for publishingColumns that store hyperlinks and display the names of hyperlinks defined in the item properties. Link formatting and constraints may apply. This field type renders an image to the correct size on a web page when it is loaded.Rich media data for publishingA column that can store and display media files. Ideal for video content as it is streamed in the browser that could be stored in the Asset Library of the site.Managed MetadataCentrally managed metadata to tag the item. By associating metadata to content, it is easier to search.   The Column Validation on a column provides logic validation on a form, which can provide a more descriptive validation message to the user. This can be based on either individual column value validation or an overall item validation based on multiple columns. Under each new column there you have the ability to make the value a required field, give it a default value, and add it to the default view. Sync to SharePoint Workspace SharePoint Workspace, formerly known as Groove, is part of the Microsoft Office Professional Plus 2010 edition. Therefore, it's important to note that SharePoint Workspace 2010 only works with SharePoint 2010. For older versions of SharePoint, the Groove software is required. SharePoint Workspace provides the ability to use content offline on your desktop, and then synchronize into the SharePoint lists when you are back online. This functionality is ideal for those who are travelling and have limited Internet access to online information. List Workflows SharePoint Workflows consists of a sequence of connected steps that depict a sequence of operations performed by a person. By clicking on the workflow button on the Ribbon, you have the ability to add and review workflow settings. The key benefits of using workflows are to facilitate business processes and improve collaboration, through managing tasks and steps and speed up decision making by helping to ensure that the appropriate information is made available to the appropriate users at the time that they need it. Workflows also help ensure that individual workflow tasks are completed by the appropriate people and in the appropriate sequence, so users who perform these tasks can concentrate on performing the work instead of on the work processes. A business scenario for a typical workflow could be with a document library to route a document to a group of people for approval. When the author starts this workflow, the workflow creates document approval tasks, assigns these tasks to the workflow participants, and then sends e-mail alerts to the participants. When the workflow is in progress, the workflow owner or the workflow participants can check progress on the Workflow Status page. When the workflow participants complete their workflow tasks, the workflow ends and the workflow owner is automatically notified that the workflow has finished. For a workflow to work with a business process, the business process must be understood, such as how it starts and ends, and who the approvers are. Visio, Access, and Project Applications such as Visio, Access, and Project have user functionality designed for certain business activity, such as Visio for process mapping, Access for reports, and Project for project management, but often this information is created centrally in a list. SharePoint has the functionality to copy list items to these desktop applications so users can work and prepare this content for another activity. By clicking on the application icons on the Ribbon, list content is made available in the Visio, Access, and Project applications. It would be difficult for the functionality of Visio, Access, and Project to be replicated in a web-based form in SharePoint, so Microsoft has complimented these desktop applications with SharePoint by allowing information to be stored in a list and be accessed from the applications. Also, users can be very familiar with a certain application such as a project manager and Microsoft Project, and would rather work with Project and publish information to SharePoint than work in a SharePoint list to enter information. The advantages of this approach are that information can be stored in a SharePoint list, with the benefits, such as centralization, version control, and security. Export to Excel By clicking on the Export to Excel link on the Ribbon, the items in the view are exported to Excel. There are a number of benefits in exporting content to Excel, which include Excel's reporting capabilities such as graphs and pie charts, and if users do not have access to the list information then it can be e-mailed to them. You may be thinking to yourself, "I thought the whole idea of SharePoint is to centrally store information in a single location where it is accessible to everyone". Yes, it is, but there are certain scenarios where exporting data to Excel is the most appropriate approach, such as: Users who require to review the data are external to the organization and do not have access to SharePoint. It is not unknown that senior management will prefer to review the information in an Excel file, rather than clicking on a link in an e-mail. Old habits die hard! This is an export of data from a list, rather than another application to edit data and sync back into the list. View navigation To navigate to different views in a list, click on the View drop-down menu on the Ribbon. Front loading For lists to be truly utilized you must think about your current tasks and how you want them structured in SharePoint. This is called front loading of information. Questions that you should think of are: What tasks require better collaboration and with whom? Which is the most appropriate out of the box list template to use? What other SharePoint functionalities are required? alerts, workflow, and permissions? What information is going to be migrated from Excel into a list, and what column types should be used and processes established such as alerts, workflows, and retention.  
Read more
  • 0
  • 0
  • 5629

article-image-sage-act-2011-working-act-dashboards
Packt
18 Feb 2011
6 min read
Save for later

Sage ACT! 2011: Working with the ACT! Dashboards

Packt
18 Feb 2011
6 min read
In ACT! CRM, dashboards allow you to access key information in the form of a graphical interface. You can filter a Dashboard so that it contains just the information you need, or you can tweak the various elements of a Dashboard to give it a different look. Administrators and Managers of your ACT! database can create brand new Dashboards if they're required. If you want more details about the information you see in a Dashboard, you can drill-down into the Dashboard with a simple double-click to access all the juicy details. At that point, you can edit or add to your information and the Dashboard will update automatically. You can even print out a hard copy of a Dashboard to preserve the contents for posterity. Because many of the Dashboards consist of pie charts and graphs, you might even want to copy one of them and paste it into other applications such as Word, Excel, or PowerPoint. Getting familiar with the Dashboard layouts Quite simply, a Dashboard is a graphical interface that gives you a visual snapshot of a part of your business. ACT! Dashboards let you view and work with the various information contained in your database in one easy-to-access location. Dashboards can take the form of charts, graphs, or even lists. Dashboards are associated with a database and not a user; therefore all users share the same Dashboards. However, you can select your own Dashboard view in much the same way that you can select a layout. You can also filter the information that is shown in your Dashboard. A Dashboard consists of two parts: The Dashboard layout: The Dashboard layout determines which Dashboard components you see and how the filters are set. ACT! comes with six Dashboard layouts. However, Managers and Administrators can create additional Dashboard layouts using the Dashboard Designer or make permanent changes to the existing ones. Dashboard components: Each Dashboard layout consists of one or more components. A component displays different types of data from the ACT! database. For example, a Dashboard layout might include a component that lists a user's top 10 current sales opportunities, another component that graphs the activities of a specific user, and a component that displays a pie chart of the company's current pipeline. A layout can have a maximum of six components. Getting ready In order to really take advantage of the ACT! Dashboard, you'll need to make sure that your database contains a variety of information. Specifically you'll need to make sure that your database contains a few Contacts, Activities, and Opportunities if you're going to view any of those Dashboards. How to do it... Click the Dashboard icon on ACT!'s navigation bar. The following screenshot shows you an example of the default Dashboard page: Choose the Dashboard layout you want from the Dashboard drop-down list, at the top-left side of the Dashboard. How it works... Many of the layouts consist of the exact same components. However, the components in each of the layouts are filtered differently, giving the layouts a bit of variety. There's more... Out of the box there are five Dashboard layouts: ACT! Activities Dashboard: Shows the activities of the user currently signed into ACT!, like the one you see in the following screenshot: ACT! Administration Dashboard: Lists the database users and shows when they've logged in and out of the database. Also lists any remote sync users, the date of their list sync, and how many days they have before their remote database expires if they don't synchronize. ACT! Contact Dashboard: Gives you a list of recently created contacts, recently edited contacts, and the number of fields that have changed. ACT! Default Dashboard: Includes three activity and three opportunity components. ACT! Opportunities Dashboard: Provides you with four different opportunity components including sales analysis by stage, value, and product. Each Dashboard layout is actually a file ending with the .dsh extension. You'll find them safely filed in the Dashboards sub-folder of the database files folder associated with your database. Accessing information from Dashboards Once you've become familiar with the various Dashboard layouts your next step is to start exploring the components found in each layout to see what data they contain. The components are generally arranged in a grid of two columns of three rows for a total of six components per Dashboard layout. The basic components include: My Schedule At-A-Glance: Found on the Default and Activities Dashboards, this component lists your activities of the current user for the current day. Activities by User: Found on the Default and Activities Dashboards, this component displays the activities for the current user for the current month, sorted by type, in a bar chart. The total numbers of activities are shown in the following screenshot. In addition you can hover your mouse over a bar section to see the number of activities for that activity type. Activity List: Found on the Activities Dashboard, this component is identical to the My Schedule At-A-Glance components, except that it lists all the activities for the current month. Opportunity Pipeline by Stage: Found on the Opportunities and Default Dashboards, this component displays your open opportunities in the ACT! Sales Cycle process for the current month sorted by stage, in a pie chart and includes a recap on the side like the one you see in the following screenshot: Contact History Count by User Type: Found on the Contacts Dashboard this component displays history items created by database users within a specified number of days similar to what's shown in the following screenshot: Opportunities - Open by Product: Found on the Opportunities Dashboard, the component displays a pie chart of the open opportunities by product and by user. Top 10 Opportunities: Found on the Opportunities and Default Dashboards, this component displays a list, by company and opportunity name, of the top ten open opportunities in the ACT! Sales Cycle process for the current month. Closed Sales to Date: Found on the Opportunities and Default Dashboards, this component displays the weighted and total value of opportunities in the ACT! Sales Cycle process, you closed and won in the form of a chart. Optionally you can customize the component to indicate a sales goal like the one shown in the following screenshot:
Read more
  • 0
  • 0
  • 3498

article-image-how-overcome-pitfalls-magento
Packt
17 Feb 2011
7 min read
Save for later

How to Overcome the Pitfalls of Magento

Packt
17 Feb 2011
7 min read
  Magento 1.4 Development Cookbook Extend your Magento store to the optimum level by developing modules and widgets Develop Modules and Extensions for Magento 1.4 using PHP with ease Socialize your store by writing custom modules and widgets to drive in more customers Achieve a tremendous performance boost by applying powerful techniques such as YSlow, PageSpeed, and Siege Part of Packt's Cookbook series: Each recipe is a carefully organized sequence of instructions to complete the task as efficiently as possible         Read more about this book       (For more resources on Magento, see here.) The reader can benefit from the previous article on Magento 1.4: Performance Optimization. Using APC/Memcached as the cache backend Magento has got a cache system that is based on files by default. We can boost the overall performance by changing the cache handler to a better engine like APC or Memcached. This recipe will help us to set up APC or Memcached as the cache backend. Getting ready Installation of APC: Alternative PHP Cache (APC) is a PECL extension. For any Debian-based Distro, it can be installed with an easy command from the terminal: sudo apt-get install php5-apc Or: sudo pecl install APC You can also install it from the source. The package download location for APC is: http://pecl.php.net/package/APC. Check whether it exists or not in phpinfo(). If you cannot see an APC block there, then you might not have added APC in the php.ini file. Installation of Memcached: Memcached is also available in most OS package repositories. You can install it from the command line: sudo apt-get install php5-memcached Memcached could be installed from source as well. Check whether it exists or not in phpinfo(). If you cannot see a Memcached block there, then you might not have added Memcached in the php.ini file. You can also check it via the telnet client. Issue the following command in the terminal: telnet localhost 11211 We can issue the get command now: get greeting Nothing happened? We have to set it first. set greeting 1 0 11 Hello World STORED get greeting Hello World END quit How to do it... Okay, we are all set to go for the APC or Memcached. Let's do it now for APC. Open local.xml in your favorite PHP editor. Add the cache block as follows: <?xml version="1.0"?> <config> <global> <install> <date><![CDATA[Sat, 26 Jun 2010 11:55:18 +0000]]></date> </install> <cache> <backend>apc</backend> <prefix>alphanumeric</prefix> </cache> <crypt> <key><![CDATA[870f60e1ba58fd34dbf730bfa8c9c152]]></key> </crypt> <disable_local_modules>false</disable_local_modules> <resources> <db> <table_prefix><![CDATA[]]></table_prefix> </db> <default_setup> <connection> <host><![CDATA[localhost]]></host> <username><![CDATA[root]]></username> <password><![CDATA[f]]></password> <dbname><![CDATA[magento]]></dbname> <active>1</active> </connection> </default_setup> </resources> <session_save><![CDATA[files]]></session_save> </global> <admin> <routers> <adminhtml> <args> <frontName><![CDATA[backend]]></frontName> </args> </adminhtml> </routers> </admin> </config> Delete all files from the var/cache/ directory. Reload your Magento and benchmark it now to see the boost in performance. Run the benchmark several times to get an accurate result. ab -c 5 -n 100 http://magento.local.com/ You can use either APC or Memcached. Let's test it with Memcached now. Delete the cache block as we set with APC previously and add the cache block as follows: <?xml version="1.0"?> <config> <global> <install> <date><![CDATA[Sat, 26 Jun 2010 11:55:18 +0000]]></date> </install> <crypt> <key><![CDATA[870f60e1ba58fd34dbf730bfa8c9c152]]></key> </crypt> <disable_local_modules>false</disable_local_modules> <resources> <db> <table_prefix><![CDATA[]]></table_prefix> </db> <default_setup> <connection> <host><![CDATA[localhost]]></host> <username><![CDATA[root]]></username> <password><![CDATA[f]]></password> <dbname><![CDATA[magento]]></dbname> <active>1</active> </connection> </default_setup> </resources> <session_save><![CDATA[files]]></session_save> <cache> <backend>memcached</backend> apc / memcached / xcache / empty=file <slow_backend>file</slow_backend> database / file (default) - used for 2 levels cache setup, necessary for all shared memory storages <memcached> memcached cache backend related config <servers> any number of server nodes can be included <server> <host><![CDATA[127.0.0.1]]></host> <port><![CDATA[11211]]></port> <persistent><![CDATA[1]]></persistent> <weight><![CDATA[2]]></weight> <timeout><![CDATA[10]]></timeout> <retry_interval><![CDATA[10]]></retry_interval> <status><![CDATA[1]]></status> </server> </servers> <compression><![CDATA[0]]></compression> <cache_dir><![CDATA[]]></cache_dir> <hashed_directory_level><![CDATA[]]> </hashed_directory_level> <hashed_directory_umask><![CDATA[]]> </hashed_directory_umask> <file_name_prefix><![CDATA[]]></file_name_prefix> </memcached> </cache> </global> <admin> <routers> <adminhtml> <args> <frontName><![CDATA[backend]]></frontName> </args> </adminhtml> </routers> </admin> </config> Save the local.xml file, clear all cache files from /var/cache/ and reload your Magento in the frontend and check the performance. Mount var/cache as TMPFS: mount tmpfs /path/to/your/magento/var/cache -t tmpfs -o size=64m How it works... Alternative PHP Cache (APC) is a free, open source opcode cache framework that optimizes PHP intermediate code and caches data and compiled code from the PHP bytecode compiler in shared memory, which is similar to Memcached. APC is quickly becoming the de facto standard PHP caching mechanism, as it will be included built-in to the core of PHP, starting with PHP 6. The biggest problem with APC is that you can only access the local APC cache. Memcached's magic lies in its two-stage hash approach. It behaves as though it were a giant hash table, looking up key = value pairs. Give it a key, and set or get some arbitrary data. When doing a memcached lookup, first the client hashes the key against the whole list of servers. Once it has chosen a server, the client then sends its request, and the server does an internal hash key lookup for the actual item data. Memcached affords us endless possibilities (query caching, content caching, session storage) and great flexibility. It's an excellent option for increasing performance and scalability on any website without requiring a lot of additional resources. Changing the var/cache to TMPFS is a very good trick to increase disk I/O. I personally found both APC's and Memcached's performance pretty similar. Both are good to go. If you want to split your cache in multiple servers go for the Memcached. Good Luck! The highlighted sections in code are for the APC and Memcached settings, respectively.  
Read more
  • 0
  • 0
  • 1764

article-image-magento-14-performance-optimization
Packt
17 Feb 2011
12 min read
Save for later

Magento 1.4: Performance Optimization

Packt
17 Feb 2011
12 min read
  Magento 1.4 Development Cookbook Extend your Magento store to the optimum level by developing modules and widgets Develop Modules and Extensions for Magento 1.4 using PHP with ease Socialize your store by writing custom modules and widgets to drive in more customers Achieve a tremendous performance boost by applying powerful techniques such as YSlow, PageSpeed, and Siege Part of Packt's Cookbook series: Each recipe is a carefully organized sequence of instructions to complete the task as efficiently as possible         Read more about this book       (For more resources on Magento, see here.) The reader can benefit from the previous article on How to Overcome the Pitfalls of Magento. Users really respond to speed.—Marissa Mayer, Google vice president of the research section and user experience. We will explain why this quote is true throughout this article. Her key insight for the crowd at the Web 2.0 Summit is that "slow and steady doesn't win the race". Today people want fast and furious. Not convinced? Okay, let's have a look at some arguments: 500ms lost is to lose 20 percent of traffic for Google (this might be why there are only ten results per page in the research). Increased latency of 100ms costs 1 percent of sales for Amazon. Reducing by 25 percent the weight of a page is to win 25 percent of users in the medium term for Google. Losing 400ms is to have a 5-9 percent drop in addition to Yahoo!, an editorial site. This is the era of milliseconds and terabytes, so we have to pay a big price if we can't keep up. This article will describe how to ensure the optimum performance of your Magento store. Measuring/benchmarking your Magento with Siege, ab, Magento profiler, YSlow, Page Speed, GTmetrix, and WebPagetest The very first task of any website's performance optimization is to know its pitfalls. In other words, know why it is taking too much time. Who are the culprits? Fortunately, we have some amicable friends who will guide us through. Let's list them: ab (ApacheBench): This is bundled with every Apache as a benchmarking utility. Siege: This is an open source stress/regression test and benchmark utility by Joe Dog. Magento profiler: This is a built-in Magento profiler. YSlow: This is a tool from Yahoo! We have been using it for years. This is in fact a firebug add-on. Page Speed: This is yet another firebug add-on from Google to analyze page performance on some common rules. GTmetrix: This is a cool online web application from which you can get both YSlow and Page Speed in the same place. Opera fanboys who don't like Firefox or Chrome might use it for YSlow and Page Speed here. WebPagetest: This is another online tool for benchmarking as GTmetrix. It also collects and shows screenshots with the reports. Okay, we are introduced to our new friends. In this recipe, we will work with them and find the pitfalls of our Magento store. Getting ready Before starting the work, we have to make sure that every required tool is in place. Let's check it. ab: This Apache benchmarking tool is bundled with every Apache installation. If you are on a Linux-based distribution, you can give it a go by issuing the following command in the terminal: ab -h Siege: We will use this tool in the same box as our server. So make sure you have it installed. You can see it by typing this command (note that the option is capital V): siege -V If it's installed, you should see the installed version information of Siege. If it's not, you can install it with the following command in any Debian-based Distro: sudo apt-get install siege You can also install it from source. To do so, grab the latest source from here: ftp://ftp.joedog.org/pub/siege/siege-latest.tar.gz, then issue the following steps sequentially: # go the location where you downloaded siegetar xvzf siege-latest.tar.gz# go to the siege folder. You should read it with something likesiege-2.70./configuremakemake install If you are on a Windows-based box, you would find it as: apache/bin/ab.exe Magento Profile: This is also a built-in tool with Magento. YSlow: This firebug add-on from Firefox could be installed via the Internet from here: http://developer.yahoo.com/yslow/. Firebug add-on is a dependency for YSlow. Page Speed: This is also a firebug add-on that can be downloaded and installed from: http://code.google.com/speed/page-speed/download.html. For using GTmetrix and WebPagetest, we will need an active Internet connection. Make sure you have these. How to do it... Using the simple tool ab: If you are on a Windows environment, go to the apache/bin/ folder and if you are on Unix, fire up your terminal and issue the following command: ab -c 10 -n 50 -g mage.tsv http://magento.local.com/ In the previous command, the params denote the following: -c: This is the concurrency number of multiple requests to perform at a time. The default is one request at a time. -n: This requests the number of requests to perform for the benchmarking session. The default is to just perform a single request, which usually leads to non-representative benchmarking results. -g (gnuplot-file): This writes all measured values out as a gnuplot or TSV (tab separate values) file. This file can easily be imported into packages like Gnuplot, IDL, Mathematica, Igor, or even Excel. The labels are on the first line of the file. The preceding command generates some benchmarking report in the terminal and a file named mage.tsv in the current location, as we specified in the command. If we open the mage.tsv file in a spreadsheet editor such as Open Office or MS Excel, it should read as follows: You can tweak the ab params and view a full listing of params by typing ab -h in the terminal. Using Siege: Let's lay Siege to it! Siege is an HTTP regression testing and benchmarking utility. It was designed to let web developers measure the performance of their code under duress, to see how it will stand up to load on the Internet. Siege supports basic authentication, cookies, HTTP, and HTTPS protocols. It allows the user to hit a web server with a configurable number of concurrent simulated users. These users place the web server 'under Siege'. Let's create a text file with the URLs that would be tested under Siege. We can pass a single URL in the command line as well. We will use an external text file to use more URLs through a single command. Create a new text file in the terminal's current location. Let's assume that we are in the /Desktop/mage_benchmark/ directory. Create a file named mage_urls.txt here and put the following URLs in it: http://magento.local.com/http://magento.local.com/skin/frontend/default/default/favicon.icohttp://magento.local.com/js/index.php?c=auto&f=,prototype/prototype.js,prototype/validation.js,scriptaculous/builder.js,scriptaculous/effects.js,scriptaculous/dragdrop.js,scriptaculous/controls.js,scriptaculous/slider.js,varien/js.js,varien/form.js,varien/menu.js,mage/translate.js,mage/cookies.jshttp://magento.local.com/skin/frontend/default/default/css/print.csshttp://magento.local.com/skin/frontend/default/default/css/stylesie.csshttp://magento.local.com/skin/frontend/default/default/css/styles.csshttp://magento.local.com/skin/frontend/default/default/images/np_cart_thumb.gifhttp://magento.local.com/skin/frontend/default/default/images/np_product_main.gifhttp://magento.local.com/skin/frontend/default/default/images/np_thumb.gifhttp://magento.local.com/skin/frontend/default/default/images/slider_btn_zoom_in.gifhttp://magento.local.com/skin/frontend/default/default/images/slider_btn_zoom_out.gifhttp://magento.local.com/skin/frontend/default/default/images/spacer.gifhttp://magento.local.com/skin/frontend/default/default/images/media/404_callout1.jpghttp://magento.local.com/electronics/cameras.htmlhttp://magento.local.com/skin/frontend/default/default/images/media/furniture_callout_spot.jpghttp://magento.local.com/skin/adminhtml/default/default/boxes.csshttp://magento.local.com/skin/adminhtml/default/default/ie7.csshttp://magento.local.com/skin/adminhtml/default/default/reset.csshttp://magento.local.com/skin/adminhtml/default/default/menu.csshttp://magento.local.com/skin/adminhtml/default/default/print.csshttp://magento.local.com/nine-west-women-s-lucero-pump.html These URLs will vary with yours. Modify it as it fits. You can add more URLs if you want. Make sure that you are in the /Desktop/mage_benchmark/ directory in your terminal. Now issue the following command: siege -c 50 -i -t 1M -d 3 -f mage_urls.txt This will take a fair amount of time. Be patient. After completion it should return a result something like the following: Lifting the server siege.. done.Transactions: 603 hitsAvailability: 96.33 %Elapsed time: 59.06 secsData transferred: 10.59 MBResponse time: 1.24 secsTransaction rate: 10.21 trans/secThroughput: 0.18 MB/secConcurrency: 12.69Successful transactions: 603Failed transactions: 23Longest transaction: 29.46Shortest transaction: 0.00 Repeat the steps 1 and 3 to produce reports with some variations and save them wherever you want. The option details could be found by typing the following command in the terminal: siege -h Magento profiler: Magento has a built-in profiler. You can enable it from the backend's System | Configuration | Advanced | Developer | Debug section. Now open the index.php file from your Magento root directory. Uncomment line numbers 65 and 71. The lines read as follows: line 65: #Varien_Profiler::enable(); // delete #line 71: #ini_set(<display_errors>, 1); // delete # Save this file and reload your Magento frontend in the browser. You should see the profiler data at the bottom of the page, similar to the following screenshot: (Move the mouse over the image to enlarge.) Yslow: We have already installed the YSlow firebug add-on. Open the Firefox browser and let's activate it by pressing the F12 button or clicking the firebug icon from the bottom-right corner of Firefox. Click on the YSlow link in firebug. Select the Rulesets. In my case I chose YSlow (V2). Click on the Run Test button. After a few seconds you will see a report page with the grade details. Here is mine: You can click on the links and see what it says. Page Speed: Fire up your Firefox browser. Activate the firebug panel by pressing F12. Click on the Page Speed link. Click on the Performance button and see the Page Speed Score and details. The output should be something like the following screenshot: Using GTmetrix: This is an online tool to benchmark a page with a combination of YSlow and Page Speed. Visit http://gtmetrix.com/ and DIY (Do It Yourself). Using WebPagetest: This is a similar tool as GTmetrix, which can be accessed from here: http://www.webpagetest.org/. How it works... ab is a tool for benchmarking your Apache Hypertext Transfer Protocol (HTTP) server. It is designed to give you an impression of how your current Apache installation performs. This especially shows you how many requests per second your Apache installation is capable of serving. The analysis that Siege leaves you with can tell you a lot about the sustainability of your code and server under duress. Obviously, availability is the most critical factor. Anything less than 100 percent means there's a user who may not be able to access your site. So, in the above case, there's some issue to be looked at, given that availability was only 96.33 percent on a sustained 50 concurrent, one minute user Siege. Concurrency is measured as the time of each transaction (defined as the number of server hits including any possible authentication challenges) divided by the elapsed time. It tells us the average number of simultaneous connections. High concurrency can be a leading indicator that the server is struggling. The longer it takes the server to complete a transaction while it's still opening sockets to deal with new traffic, the higher the concurrent traffic and the worse the server performance will be. Yahoo!'s exceptional performance team has identified 34 rules that affect web page performance. YSlow's web page analysis is based on the 22 of these 34 rules that are testable. We used one of their predefined ruleset. You can modify and create your own as well. When analyzing a web page, YSlow deducts points for each infraction of a rule and then applies a grade to each rule. An overall grade and score for the web page is computed by summing up the values of the score for each rule weighted by the rule's importance. Note that the rules are weighted for an average page. For various reasons, there may be some rules that are less important for your particular page. In YSlow 2.0, you can create your own custom rulesets in addition to the following three predefined rulesets: YSlow(V2): This ruleset contains the 22 rules Classic(V1): This ruleset contains the first 13 rules Small Site or Blog: This ruleset contains 14 rules that are applicable to small websites or blogs Page Speed generates its results based on the state of the page at the time you run the tool. To ensure the most accurate results, you should wait until the page finishes loading before running Page Speed. Otherwise, Page Speed may not be able to fully analyze resources that haven't finished downloading. Windows users can use Fiddler as an alternative to Siege. You can download it from http://www.fiddler2.com/fiddler2/, which is developed by Microsoft.  
Read more
  • 0
  • 0
  • 1942
article-image-new-moodle-books-packt
Packt
17 Feb 2011
2 min read
Save for later

New Moodle Books from Packt

Packt
17 Feb 2011
2 min read
Moodle 2.0 Multimedia Cookbook Add images, videos, music, and much more to make your Moodle course interactive and fu To add print book to your cart Science Teaching with Moodle 2.0 Create interactive lessons and activities in Moodle to enhance your students' understanding and enjoyment of science To add print book to your cart Moodle JavaScript Cookbook Over 50 recipes for making your Moodle system more dynamic and responsive with JavaScript To add print book to your cart Moodle Security Learn how to install and configure Moodle in the most secure way possible                                                   To add print book to your cart Moodle 2.0 for Business Beginner's Guide Implement Moodle in your business to streamline your interview, training, and internal communication processes                            To add print book to your cart "If you are thinking of using Moodle in a commercial enteprise, then this is an extremely valuable book" - Mary Cooch, Moodle expert,     History Teaching with Moodle 2 Create a History course in Moodle packed with lessons and activities to make learning and teaching History interactive and fun                            To add print book to your cart Upcoming Moodle Books... Moodle 2.0 E-Learning Course Development: RAW A complete guide to successful learning using Moodle To add print book to your cart The above Moodle 2.0 E-Learning Course Development book is due to be published in September 2011, but is available now in RAW format, whereby you can download and access immediately, reading as it's written For further information on Packt RAW books click here
Read more
  • 0
  • 0
  • 900

article-image-managing-events-using-civicrm
Packt
17 Feb 2011
10 min read
Save for later

Managing Events using CiviCRM

Packt
17 Feb 2011
10 min read
Using CiviCRM Registrant processing and event promotion are often the most challenging, time consuming, and important pieces of the management process. CiviCRM provides flexible event management tools to define the nature of the event, determine the data and fees that must be collected, track participants as they register online or are entered by staff through the administrative tools, and develop the lists, nametags, and other resources you need to present an outstanding professional event. Why host events? Before digging further into things, it's worth taking a minute to ask the questions: why would you host events, and what exactly is an "event" as it relates to CiviCRM? Many not-for-profits exist as organizations that people donate to, become members of, or support in other ways. The purpose and services many organizations provide are not oriented around "walk-in" support or other face-to-face interactions with constituents, apart from events. Events provide an important (and often, the only) in-person interaction with your supporters, members, and others committed to the mission and vision of your organization. As such, the face and voice of the organization is most clearly seen and realized during events. So what exactly is an "event"? In CiviCRM, event management tools allow you to do the following: Publish and advertise an event description including date, time, and location Register participants Calculate and collect fees Collect data about participants Track registrant's status Use more advanced elements, such as self-registration forms on your site with automated waiting lists You are not likely to use the event tools for very small group meetings, such as a one-to-one meeting with a constituent, board meetings, committee meetings, and other such no-fee, basic events. For these events, it will be easier and simpler to use a CiviCRM activity, either with the pre-configured meeting activity type, or through your own custom activity types. Building and promoting your event The first step in event management is to configure your event in the system. Once configured, you can begin collecting registrations and tracking participants. The event tools all reside under the navigation bar's Events menu. As with other areas of CiviCRM, the event administration tools are not always provided in a simple, task-oriented workflow. You are likely to find that the creation, configuration, registration, tracking, reporting, and managing happen in a more iterative pattern, rather than a linear one. We will begin by walking through the event creation process, touching on the various options available, and may circle back later to delve deeper into various areas. Use the New Event option to begin the process of setting up an event. This opens up an initial information and basic settings form. After saving it, you will be directed to a tabbed interface where you optionally configure four other settings areas (or return to adjust this first form). You should carefully work through each tab in a sequential wizard-style way when first becoming familiar with the event tools. Information and settings The first form defines basic information about the event, including its category (type), title, description, dates, and so on. You may notice that the very first field on this form is for selecting an event template. If no event template exists, a notice to this effect will appear at the top of the page. Event templates are very useful if your organization hosts a number of very similar events, such as a monthly breakfast seminar series, or a bi-monthly training workshop. From one event to the next, the structure, fees, location, and perhaps even the basic description remains similar. In such cases, you can save time and reduce errors by setting up an event template under Events | Event Templates. The template creation tool is almost identical to the five-tabbed form we will be working through now, with the exception of a few fields removed (such as event dates) that are presumed to be unique for each event. When creating a template, complete only those fields which are common to all (or most) events of this type. For example, if your monthly breakfast seminar hosts different speakers on different topics, you will want to leave the summary and description fields empty. When a previously configured template is selected while on the Info and Settings form for a new event, the event is pre-populated with any data stored in the template. You will have the opportunity to review, adjust, and fill in any fields in your event. Once a template has been selected for a new event, there is no association back to the template. In other words, changing template settings at a later date will have no impact on existing events that used the template. Its only purpose is to pre- populate the event, and in doing so, to facilitate the event creation process. Returning to the initial event creation form, we see event type and participant role fields. The event type is used to categorize your events, which can be useful when analyzing and managing events. You can, for example, define an event type for your annual fall conference and later run searches based on the event type, such as displaying all constituents who participated in any of the fall conferences over the last five years. The event type options are managed under Administer | CiviEvent | Event Types. Custom data fields used to collect information about your registrants can be configured based on these event types. Since events of the same type will often have similar data collection needs, this is a useful and efficient way to repurpose fields for multiple, similarly-structured events. We will discuss custom data later in this section when we review the use of profiles. They are created and configured through Administer | Customize | Custom Data. Participant roles categorize the nature of the participant. For example, your event may have attendees, guests, speakers, staff, volunteers, and other types of registrants you will track, but also want to classify. Participant roles are managed through Administer | CiviEvent | Participant Roles. Similar to event types, custom data sets may be constructed based on the participant's role. In this way, speakers can be prompted to provide a title and description of their talks, exhibitors can be asked questions about their needs for space, power, and equipment, volunteers can be asked their preferences for an assignment, and basic attendees can be asked their breakout session preferences. When defining a participant role, you have the option of deciding if a role will be counted. We will see later in the event management tools that CiviCRM provides up- to-date counts of your participants, organized into various categories, one of which is the main participant count. Typically, you will want to "count" any attendees who have paid or have committed to pay, but exclude from your count any attendees who have canceled or are in a non-attendee role. Many organizations will not count speakers or staff when reporting the number of attendees for a conference. By creating a staff role and choosing to not count it, you can still track the fact that they were present at the conference and generate name tags from the system for them, but exclude them from the counts provided to your Events Committee or Board of Directors in various reports. Be clear on who is included in your counts as there are some purposes for which you will want a "full" count, such as the number of meals required at the event. Returning to our form, the selection of a participant role in this location determines what role will be assigned when participants register using the event registration form. In most cases, you will select the Attendee role, as that is the standard role intended for event participants. Peer pressure may be a useful tool in your event promotion toolbox. CiviCRM provides the option of exposing a participant listing to site visitors. When visited, a current list of all participants will be displayed. There are three listing templates included in the standard installation, namely Name Only, Name and Email, and Name, Status and Register Date. Unfortunately, at this time, there is no interface for setting up alternative collections of fields to be included in listings. If you have the ability and resources to edit PHP and Smarty .tpl templating files, you can create more templates and tell the system about them through Administer | CiviEvent | Participant Listing Templates. While participant listing pages may serve as an effective peer-pressure promotion tool, they may also be perceived as invasive to privacy by your attendees. Make sure the nature of the event (and the nature of your constituents) supports displaying such a list. In particular, be sensitive to the use of the name and e-mail template, as some contacts may not want their e-mail information disseminated in this way. Enter the title of your event, keeping in mind that it will be publicly visible in the event information and registration pages. You also will want the event to be uniquely named to avoid confusion with other events. For example, if you host an annual conference, you might name it: Annual Conference 2010, Annual Conference 2011, and so on. Use the Event Summary and Complete Description fields to describe the event, such as the topics covered, speakers, audience, and so on. As the name suggests, the Event Summary field should be brief and succinct. It will be included in RSS and iCal feeds generated by the system, which you may use for promotional efforts. The Complete Description field should be more complete, and is displayed on the event information page. Your RSS feeds allow other websites to automatically pull content from your site and display it on their site. The event feeds include information about your events, such as links to send their visitors to your registration pages. iCal feeds are another similar format for publishing your event information. People can set up their Google Calendar, Outlook, and other similar calendaring applications automatically to read in these feeds and display your events on the right date and time. Define the event's start and end date/time. For a single-day event, it is sufficient to just complete the start date field. We'll spend a bit of time in a moment on the waitlist option. Proceed to the final set of fields on this first step of the event wizard, and click to enable or disable the following options: Include Map to Event Location?: Inserts a Google or Yahoo! map on the information page with the event location plotted. You must have a location defined on the second step of the wizard and must have geocoding configured in your Global Settings to make use of this function. Public Event?: Determines if the event appears in RSS/iCal feeds, in the HTML event listing page, and in Drupal's CiviCRM Upcoming Events block. Turn this off if you have "invitation-only" events that you don't want to publicize through the automated methods. Is the Event Active?: Enables or disables the event. A disabled event will be hidden from RSS/iCal/HTML listings and cannot be visited through event information pages or registration forms. Be careful about disabling past events thinking they would not be accessed by site visitors. If you have older content articles on your site that reference the event information page, it's possible that people will visit older events to learn what information was covered. We will see later on that there are options for limiting the date/time window when people may register for the event, so you do not need to be concerned about people registering for past events inadvertently.
Read more
  • 0
  • 0
  • 2363

article-image-creating-budget-your-business-gnucash
Packt
16 Feb 2011
4 min read
Save for later

Creating a Budget for your Business with Gnucash

Packt
16 Feb 2011
4 min read
Why do you need to create a budget? There are two main reasons why you may want to create budgets. You want a trip planner for your business. You will use this on a day-to-day basis to run your business and make decisions. The second reason is if you are seeking outside finance for your business from a bank, investor, or other lender. They will require you to submit your business plan along with projected financials. Time for action – creating a budget for your business You are going to create a budget for the next three months to serve as a guide for your operations. Typically, investors, banks and other lenders will need financial projections for a longer period. As a minimum they will need one year projections which may go up to 3 to 5 years in many cases. From the menu select Actions Budget | New Budget|. A new budget screen will open. Click on the Options toolbar button. The Budget Options dialog will open. For this tutorial, we are going to select a beginning date of three months back. This is only for the purposes of this tutorial and will allow us to quickly run Budget vs. Actual reports. In the Budget Period pane, change the beginning on date to a date three months ago. Change the Number of Periods to 3. Type in the Budget Name MACS Jun-Aug Budget as shown in the following screenshot and click on OK. The screen will show a list of accounts with a column for each month. The date shown in the title of each column is the beginning of that period. Now enter the values by simply clicking on the cell and entering the amount as shown in the following screenshot.   Using the Tab key while entering budget amounts Don't use the Tab key. The value entered in the previous field seems to vanish into thin air if you use the Tab key. Instead use the Enter key and the mouse. When you are done entering all the values, don't forget to save changes. Now that the budget has been created, you are ready to run the reports. From the menu select Reports Budget | Budget Report|. In the Options dialog select all the Income and Expenses accounts in the Accounts tab. Check Show Difference in the Display tab and click on OK to see the report as shown in the following screenshot: We are going to create the Cash Flow Budget in a spreadsheet. Go ahead and copy the data from the preceding report to the spreadsheet of your choice. Put in additional rows and formulas along the lines shown below. We are showing the cashflow for a six month period in the following screenshot to make it easier for you to see some of the trends and business challenges more clearly: What just happened? What if you had tomorrow's news... TODAY? His name is Gary Hobson. He gets tomorrow's newspaper today. He doesn't know how. He doesn't know why. All he knows is when the early edition hits his doorstep, he has twenty-four hours to set things right. You may recall that in the TV series early edition, Kyle Chandler who plays the role of Gary Hobson uses this knowledge to prevent terrible events each day. What if we told you that you can get tomorrow's news for your business today? You can prevent terrible events from happening to your business. You can get tomorrow's sales, expenses, and cash flow in the form of a budget. Mistakes are far less costly when made on paper than with actual dollars. Sometimes budgets are referred to as projections. For example, banks, investors, and lenders will ask for a business plan with profit and loss, balance sheet, and cash flow projections. Other times, these are called forecasts, especially when referring to sales forecasts. Regardless of whether we call them budgets, projections or forecasts, we are referring to the future. Unlike the rest of bookkeeping, which is concerned with the past, budgeting is one area, which tries to look in the crystal ball, and attempts to see what the future might look like, or what you are committing to make it look like. If you are running a business without a budget, I am sure there are times when the thought flashes through your mind, "I wish I had known that earlier." Your budget is the crystal ball that enables you to see the future, and do something about it. Generally, when you complete a budget, you will have a number of revelations. For example, you might find that your cash flow is going into negative territory in the third month. The budget allows you to perceive problems before they occur and alter your plans to prevent those problems.
Read more
  • 0
  • 0
  • 4941
article-image-alfresco-3-business-solutions-document-migration-strategies
Packt
15 Feb 2011
13 min read
Save for later

Alfresco 3 Business Solutions: Document Migration Strategies

Packt
15 Feb 2011
13 min read
Alfresco 3 Business Solutions Practical implementation techniques and guidance for delivering business solutions with Alfresco Deep practical insights into the vast possibilities that exist with the Alfresco platform for designing business solutions. Each and every type of business solution is implemented through the eyes of a fictitious financial organization - giving you the right amount of practical exposure you need. Packed with numerous case studies which will enable you to learn in various real-world scenarios. Learn to use Alfresco's rich API arsenal with ease. Extend Alfresco's functionality and integrate it with external systems. The Best Money CMS project is now in full swing and we have the folder structure with business rules designed and implemented and the domain content model created. It is now time to start importing any existing documents into the Alfresco repository. Most companies that implement an ECM system, and Best Money is no exception, will have a substantial amount of files that they want to import, classify, and make searchable in the new CMS system. The planning and preparation for the document migration actually has to start a lot earlier, as there are a lot of things that need to be prepared: Who is going to manage sorting out files that should be migrated? What is the strategy and process for the migration? What sort of classification should be done during the import? What filesystem metadata needs to be preserved during the import? Do we need to write any temporary scripts or rules just for the import? Document migration strategies The first thing we need to do is to figure out how the document migration is actually going to be done. There are several ways of making this happen. We will discuss a couple of different ways, such as via the CIFS interface and via tools. There are also some general strategies that apply to any migration method. General migration strategies There are some common things that need to be done no matter which import method is used, such as setting up a document migration staging area. Document staging area The end users need to be able to copy or move documents—that they want to migrate—to a kind of staging area that mirrors the new folder structure that we have set up in Alfresco. The best way to set up the staging area is to copy it from Alfresco via CIFS. When this is done the end users can start copying files to the staging area. However, it is a good idea to train the users in the new folder structure before they start copying documents to it. We should talk to them about folder structure changes, what rules and naming conventions have been set up, the idea behind it, and why it should be followed. If we do not train the end users in the new folder structure, they will not honor it and the old structure will get mixed up with the new structure via document migration, and this is not something that we want. We did plan and implement the new structure for today's requirements and future requirements and we do not want it broken before we even start using the system. The end users will typically work with the staging area over some time. It is good if they get a couple of weeks for this. It will take them time to think about what documents they want to migrate and if any re-organization is needed. Some documents might also need to be renamed. Preserving Modified Date on imported documents We know that Best Money wants all their modified dates on the files to be preserved during an import, as they have a review process that is dependent on it. This means that we have to use an import method that can preserve the Modified Date on the network drive files when they are merged into the Alfresco repository. The CIFS interface cannot be used for this as it sets Modified Date to Current Date. There are a couple of methods that can be used to import content into the repository and preserve the Modified Date: Create an ACP file via an external tool and then import it Custom code the import with the Foundation API and turn off the Audit Aspect before the import Use an import tool that also has the possibility to turn off the Audit Aspect At the time of writing (when I am using Alfresco 3.3.3 Enterprise and Alfresco Community 3.4a) there is no easy way to import files and preserve the Modified Date. When a file is added via Alfresco Explorer, Alfresco Share, FTP, CIFS, Foundation API, REST API, and so on, the Created Date and Modified Date is set to "now", so we lose all the Modified Date data that was set on the files on the network drive. The Created Date, Creator, Modified Date, Modifier, and Access Date are all so called Audit properties that are automatically managed by Alfresco if a node has the cm:auditable aspect applied. If we try and set these properties during an import via one of the APIs, it will not succeed. Most people want to import files via CIFS or via an external import tool. Alfresco is working towards supporting preserving dates when using both these methods for import. Currently, there is a solution to add files via the Foundation API and preserve the dates, which can be used by custom tools. The Alfresco product itself also needs this functionality in, for example, the Transfer Service Receiver, so the dates can be preserved when it receives files. The new solution that enables the use of the Foundation API to set Auditable properties manually has been implemented in version 3.3.2 Enterprise and 3.4a Community. To be able to set audit properties do the following: Inject the policy behavior filter in the class that should do the property update: <property name="behaviourFilter" ref="policyBehaviourFilter"/> Then in the class, turn off the audit aspect before the update, it has to be inside a new transaction, as in the following example: RetryingTransactionCallback<Object> txnWork = new RetryingTransactionCallback<Object>() { public Object execute() throws Exception { behaviourFilter.disableBehaviour (ContentModel.ASPECT_AUDITABLE); Then in the same transaction update the Created or Modified Date: nodeService.setProperty(nodeRef, ContentModel.PROP_MODIFIED, someDate); . . . } }; With JDK 6, the Modified Date is the only file data that we can access, so no other file metadata is available via the CIFS interface. If we use JDK 7, there is a new NIO 2 interface that gives access to more metadata. So, if we are implementing an import tool that creates an ACP file, we could use JDK 7 and preserve Created Date, Modified Date, and potentially other metadata as well. Post migration processing scripts When the document migration has been completed, we might want to do further processing of the documents such as setting extra metadata. This is specifically needed when documents are imported into Alfresco via the CIFS interface, which does not allow any custom metadata to be set during the import. There might also be situations, such as in the case of Best Money, where a lot of the imported documents have older filenames (that is, following an older naming convention) with important metadata that should be extracted and applied to the new document nodes. For post migration processing, JavaScript is a convenient tool to use. We can easily define Lucene queries for the nodes we want to process, as the rules have applied domain document types such as Meeting to the imported documents, and we can use regular expressions to match and extract the metadata we want to apply to the nodes. Search restrictions when running post-migration scripts What we have to think about though when running these post-migration scripts, is that the repository now contains a lot of content, so each query we run might very well return much more than 1,000 rows. And 1,000 rows is the default max limit that a search will return. To change this to allow for 5,000 rows to be returned, we have to make some changes to the permission check configuration (Alfresco checks the permissions for each node that is being accessed, so the user running the query is not getting back content that he or she should not have access to). Open the alfresco-global.properties file located in the alfresco/tomcat/shared/classes directory and add the following properties: # The maximum time spent pruning results (was 10000) system.acl.maxPermissionCheckTimeMillis=100000 # The maximum number of results to perform permission checks against (was 1000) system.acl.maxPermissionChecks=5000 Unwanted Modified Date updates when running scripts So we have turned off the audit feature during document migration or made some custom code changes to Alfresco, to get the document's Modified Date to be preserved during import. Then we have turned on auditing again so the system behaves in the way the users expect. The last thing we want now is for all those preserved modified dates to be set to the current date when we update metadata. And this is what will happen if we are not running the post-migration scripts with the audit feature turned off. So this is important to think about unless you want to start all over again with the document migration. Versioning problems when running post-migration scripts Another thing that can cause problems is when we have versioning turned on for documents that we are updating the post-migration scripts. If we see the following error: org.alfresco.service.cmr.version.VersionServiceException: 07120018 The current implementation of the version service does not support the creation of branches. By default, new versions will be created even when we just update properties/metadata. This can cause errors such as the preceding error and we might not even be able to check-in and check-out the document. To prevent this error from popping up, and turn off versioning during property updates once and for all, we can set the following property at the same time as we set the other domain metadata in the scripts: legacyContentFile.properties["cm:autoVersionOnUpdateProps"] = false; Setting this property to false effectively turns off versioning during any property/metadata update for the document. Another thing that can be a problem is if folders have been set up as versionable by mistake. The most likely reason for this is that we probably forgot to set up the Versioning Rule to only apply to cm:content (and not to "All Items"). Folders in the workspace://SpacesStore store do not support versioning The WCM system comes with an AVM store that supports advanced folder versioning and change sets. Note that the WCM system can also store its data in the Workspace store. So we need to update the versioning rule to apply to the content and remove the versionable aspect from all folders, which have it applied, before we can update any content in these folders. Here is a script that removes the cm:versionable aspect from any folder having it applied: var store = "workspace://SpacesStore"; var query = "PATH:"/app:company_home//*" AND TYPE:"cm:folder" AND ASPECT:"cm:versionable""; var versionableFolders = search.luceneSearch(store, query); for each (versionableFolder in versionableFolders) { versionableFolder.removeAspect("cm:versionable"); logger.log("Removed versionable aspect from folder: " + versionableFolder.name); } logger.log("Removed versionable aspect from " + versionableFolders.length + " folders"); Post-migration script to extract legacy meeting metadata Best Money has a lot of documents that they are migrating to the Alfresco repository. Many of the documents have filenames following a certain naming convention. This is the case for the meeting documents that are imported. The naming convention for the old imported documents are not exactly the same as the new meeting naming convention, so we have to write the regular expression a little bit differently. An example of a filename with the new naming convention looks like this: 10En-FM.02_3_annex1.doc and the same filename with the old naming convention looks like this: 10Eng-FM.02_3_annex1.doc. The difference is that the old naming convention does not specify a two-character code for language but instead a list that looks like this: Arabic,Chinese,Eng|eng,F|Fr,G|Ger,Indonesian,Jpn,Port,Rus|Russian,Sp,Sw,Tagalog,Turkish. What we are interested in extracting is the language and the department code and the following script will do that with a regular expression: // Regulars Expression Definition var re = new RegExp("^d{2}(Arabic|Chinese|Eng|eng|F|Fr|G|Ger| Indonesian|Ital|Jpn|Port|Rus|Russian|Sp|Sw|Tagalog|Turkish)-(A| HR|FM|FS|FU|IT|M|L).*"); var store = "workspace://SpacesStore"; var query = "+PATH:"/app:company_home/cm:Meetings//*" + TYPE:"cm:content""; var legacyContentFiles = search.luceneSearch(store, query); for each (legacyContentFile in legacyContentFiles) { if (re.test(legacyContentFile.name) == true) { var language = getLanguageCode(RegExp.$1); var department = RegExp.$2; logger.log("Extracted and updated metadata (language=" + language + ")(department=" + department + ") for file: " + legacyContentFile.name); if (legacyContentFile.hasAspect("bmc:document_data")) { // Set some metadata extracted from file name legacyContentFile.properties["bmc:language"] = language; legacyContentFile.properties["bmc:department"] = department; // Make sure versioning is not enabled for property updates legacyContentFile.properties["cm:autoVersionOnUpdateProps"] = false; legacyContentFile.save(); } else { logger.log("Aspect bmc:document_data is not set for document" + legacyContentFile.name); } } else { logger.log("Did NOT extract metadata from file: " + legacyContentFile.name); } } /** * Convert from legacy language code to new 2 char language code * * @param parsedLanguage legacy language code */ function getLanguageCode(parsedLanguage) { if (parsedLanguage == "Arabic") { return "Ar"; } else if (parsedLanguage == "Chinese") { return "Ch"; } else if (parsedLanguage == "Eng" || parsedLanguage == "eng") { return "En"; } else if (parsedLanguage == "F" || parsedLanguage == "Fr") { return "Fr"; } else if (parsedLanguage == "G" || parsedLanguage == "Ger") { return "Ge"; } else if (parsedLanguage == "Indonesian") { return "In"; } else if (parsedLanguage == "Ital") { return ""; } else if (parsedLanguage == "Jpn") { return "Jp"; } else if (parsedLanguage == "Port") { return "Po"; } else if (parsedLanguage == "Rus" || parsedLanguage == "Russian") { return "Ru"; } else if (parsedLanguage == "Sp") { return "Sp"; } else if (parsedLanguage == "Sw") { return "Sw"; } else if (parsedLanguage == "Tagalog") { return "Ta"; } else if (parsedLanguage == "Turkish") { return "Tu"; } else { logger.log("Invalid parsed language code: " + parsedLanguage); return ""; } } This script can be run from any folder and it will search for all documents under the /Company Home/Meetings folder or any of its subfolders. All the documents that are returned by the search are looped through and matched with the regular expression. The regular expression defines two groups: one for the language code and one for the department. So after a document has been matched with the regular expression it is possible to back-reference the values that were matched in the groups by using RegExp.$1 and RegExp.$2. When the language code and the department code properties are set, we also set the cm:autoVersionOnUpdateProps property, so we do not get any problem with versioning during the update.
Read more
  • 0
  • 0
  • 3616

article-image-alfresco-3-business-solutions-planning-and-implementing-document-migration
Packt
15 Feb 2011
5 min read
Save for later

Alfresco 3 Business Solutions: Planning and Implementing Document Migration

Packt
15 Feb 2011
5 min read
  Alfresco 3 Business Solutions Practical implementation techniques and guidance for delivering business solutions with Alfresco Deep practical insights into the vast possibilities that exist with the Alfresco platform for designing business solutions. Each and every type of business solution is implemented through the eyes of a fictitious financial organization - giving you the right amount of practical exposure you need. Packed with numerous case studies which will enable you to learn in various real world scenarios. Learn to use Alfresco's rich API arsenal with ease. Extend Alfresco's functionality and integrate it with external systems. Planning document migration Now we have got a strategy for how to do the document migration and we have several import methods to choose from, but we have not yet thought about planning the document migration. The end users will need time to select and organize the files they want to migrate and we might need some time to write temporary import scripts. So we need to plan this well ahead of production day. The end users will have to go through all their documents and decide which ones they want to keep and which ones they will no longer need. Sometimes the decision to keep a document is not up to the end user but instead might be controlled by regulations, so this requires extra research The following screenshot shows the Best Money schedule for document migration: It is not only electronic files that might need to be imported, sometimes there are paper-based files that need to be scanned and imported. This needs to be planned into the schedule too. Implementing document migration So we have a document migration strategy and we have a plan. Now let's see a couple of examples of how we can implement document migration in practice. Using Alfresco bulk filesystem import tool A tool such as the Alfresco bulk filesystem import tool is probably what most people will use and it is also the preferred import tool in the Best Money project. So let's start looking at how this tool is used. It is delivered in an AMP and is installed by dropping the AMP into the ALFRESCO_HOME/amps directory and restarting Alfresco. However, we prefer to install it manually with the Module Management Tool (MMT) as we have other AMPs, such as the Best Money AMP, that have been installed with the MMT tool. Copy the alfresco-bulk-filesystem-import-0.8.amp (or newest version) file into the ALFRESCO_HOME/bin directory. Stop Alfresco and then install the AMP as follows: C:Alfresco3.3bin>java -jar alfresco-mmt.jar install alfresco- bulkfilesystem-import-0.8.amp C:Alfresco3.3tomcatwebapps alfresco.war-verbose Running Alfresco bulk import tool Remove the ALFRESCO_HOME/tomcat/webapps/alfresco directory, so the files contained in the new AMP are recognized when the updated WAR file is exploded on restart of Alfresco. The tool provides a UI form in Alfresco Explorer that makes it very simple to do the import. It can be accessed via the http://localhost:8080/alfresco/service/bulk/import/filesystem URL, which will display the following form (you will be prompted to log in first, so make sure to log in with a user that has access to the spaces where you want to upload the content): Here, the Import directory field is mandatory and specifies the absolute path to the filesystem directory from where to load the documents and folders from. It should be specified in an OS-specific format such as for example C:docmigrationmeetings or /docmigration/meetings. Note that this directory must be locally accessible to the server where the Alfresco instance is running. It must either be a local filesystem or a locally mounted remote filesystem. The Target space field is also mandatory and specifies the target space/folder to load the documents and folders into. It is specified as a path starting with /Company Home. The separator character is Unix-style (that is, "/"), regardless of the platform Alfresco is running on. This field includes an AJAX auto-suggest feature, so you may type any part of the target space name, and an AJAX search will be performed to find and display matching items. The Update existing files checkbox field specifies whether to update files that already exist in the repository (checked) or skip them (unchecked). The import is started by clicking on the Initiate Bulk Import button. Once an import has been initiated, a status Web Script will display that reports on the status of the background import process. This Web Script automatically refreshes every 10 seconds until the import process completes. For the Best Money project, we have set up a staging area for the document migration where users can add documents to be imported into Alfresco. Let's import the Meetings folder, which looks as follows, in the staging area: One Committee meeting has been added and that is what we will test to import with the tool. Fill out the Bulk Import form as follows Click Initiate Bulk Import button to start the import. The form should show the progress of the import and when finished we should see something like this: In this case, the import took 9.5 seconds and 31 documents (totaling 28 MB) were imported and five folders created. If we look at the document nodes, we will see that they all have the bmc:document type applied and the bmc:documentData aspect applied. This is accomplished by a type rule which is added to the Meetings folder. All documents also have the cm:versionable aspect applied via the "Apply Versioning" rule, which is added to the Meetings folder.
Read more
  • 0
  • 0
  • 2207
Modal Close icon
Modal Close icon