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

7018 Articles
article-image-faqs-ibm-lotus-notes-85
Packt
17 Nov 2010
4 min read
Save for later

FAQs on IBM Lotus Notes 8.5

Packt
17 Nov 2010
4 min read
  IBM Lotus Notes 8.5 User Guide Q: What is a Lotus Notes application? A Lotus Notes application is similar in concept and function to a Microsoft Access database just like Lotus Notes mail is similar to Microsoft Outlook and other mail systems such as Gmail. An application or database is a container of data (hence the name database). Data can also be known as a record or in Lotus Notes language as a document. The documents within the Lotus Notes application can be displayed in various ways, manipulated by actions and workflow, and can store a variety of data such as text, rich text and files. Q: What is the use of the Sort Member List when we create a group? A: When we create a group, there is Sort Member List button that assists in viewing the members of the group as they are placed in alphabetical order. Q: Which are the options available with the More action button? A: There are more options available when we click on the More button. From this menu we can select: Preferences: From this area, we can set defaults for our Calendar including setting times for our schedule, enabling alarms, setting favorite rooms, and giving access to our calendar to others. Out of Office: We can enable this to inform people of our absence. We can now allow a person whom we have given access to our mail to enable this on our behalf. Import Holidays: We need to select this option to import holidays that have been configured by our IT Department. Open Person's Calendar: Allows us to select a name so that we can open their calendar if we have been granted access. Create Group Calendars: From here we can create new group calendars or alternatively view any group calendars that we have created. Calendar Cleanup: It is a tool to assist with safely deleting past calendar entries including past repeating entries. Q: What is ACL? A: ACL is an Access Control List. The access control list is all about security. It has a list of people's names or groups with different levels of access to the application. Q: What are the different levels in the ACL? A: The different levels are: Manager: This is like the owner of the application. As a manager one can edit the access control list and add, rename, and remove members. We can also change the level of access for members. A manager can also delete the application. This is the highest level of access and it incorporates all the other access levels. Designer: As the name implies a person with this level of access can make design changes to the application. If a new view is required a person with designer access would be able to create that new view. Editor: With this level of access we can typically create and edit any document within the application. Author: An author can create documents but can only edit the documents that they create. Reader: Can only read documents. Depositor: This role can only add documents. This level of access is used for applications designed for voting or questionnaires, and so on. In such applications, we just enter our information—for example, we submit the form and can't read anyone else's information, or our own information once submitted. The following is an example of an Access Control List. The yellow highlighted area is the available levels of access. Q: What is a Replica in Lotus Notes? A replica is a special copy of a Lotus Notes application that synchronizes with another replica, exchanging data so that they become the same. When we access our mail at the office, we typically open our mail on a server. To work offline we need to create a copy of our mail locally on our computer. That copy needs to be able to synchronize so that any mail that we received at the office can be copied to our mail on our computer and any messages that we have sent or filed locally are copied back to our mail on the server. In Lotus Notes this copy is called a replica because it has the ability to synchronize documents between other Notes applications—sending documents to other replicas and receiving from other replicas. To create the replica, we need to open the application on the server such as our mail and select the Make Available Offline option.
Read more
  • 0
  • 0
  • 6401

article-image-getting-started-bpm
Packt
16 Nov 2010
9 min read
Save for later

Getting Started with BPM

Packt
16 Nov 2010
9 min read
Getting Started with Oracle BPM Suite 11gR1 – A Hands-On Tutorial Learn from the experts – teach yourself Oracle BPM Suite 11g with an accelerated and hands-on learning path brought to you by Oracle BPM Suite Product Management team members Offers an accelerated learning path for the much-anticipated Oracle BPM Suite 11g release Set the stage for your BPM learning experience with a discussion into the evolution of BPM, and a comprehensive overview of the Oracle BPM Suite 11g Product Architecture Discover BPMN 2.0 modeling, simulation, and implementation Understand how Oracle uses standards like Services Component Architecture (SCA) to simplify the process of application development Describes how Oracle has unified services and events into one platform Built around an iterative tutorial, using a real-life scenario to illustrate all the key features Full of illustrations, diagrams, and tips for developing SOA applications faster, with clear step-by-step instructions and practical examples Written by Oracle BPM Suite Product Management team members           Read more about this book      (For more resources on Oracle, see here.) BPM yields high business benefits in many dimensions when adopted successfully. Thus it is prudent to be familiar, right from the start, with the essential considerations that lead to a successful BPM adoption, and conversely, the absence of which is likely to lead to failure and frustration. However, before we dive into a discussion on how we should prepare for BPM projects, a couple of clarifications are in order. First, we should point out that not all processes are business processes. A process, particularly a digital description of a process, is essentially a depiction of a sequence of activities along with applicable flow control and business logic. In digital applications such processes appear in a variety of places. Take for example a "customer information update" activity with cross-departmental scope. This may involve updating multiple back-end IT applications, and the exact update operation may differ from application to application in how much to update and in what format to communicate with the application; there may be conditions under which certain updates may or may not take place, and so on. Often, processes are used to explicitly state all the individual tasks and associated logic behind a complex activity such as this system-wide customer information update. While such a customer information update activity will be recognized as an important and essential process at a business level, its lower level details may be expressed by an information mediation process that may be of little interest to a line of business owner. Thus, the associated process is not a business process. In general, business processes will involve activities with direct relevance to the business and the process itself will typically embody all, or a significant part, of some business value-chain. Compared to the processes that guide data exchange between applications, business processes also typically engage more roles, often played by human participants, and involve complicated decision making, some of which requires sophisticated articulation of business rules; some others require live actions by the human participants. Depending on the situation, certain tasks in a business process may have to be transferred from one participant to the other. In some cases, a business task may require joint activity of several participants, as in collaboration. These behind-the-scenes, technical workflow processes that exchange data between applications and perform other integration flows in support of the business tasks are generally referred to as service orchestrations to distinguish them from core business processes. The second clarification concerns the abbreviation BPM, which is commonly used to imply Business Process Modeling, or Business Process Monitoring, or even Business Performance Management. Here we are referring to the full lifecycle of business processes of which modeling and monitoring are specific parts. Business performance management has a finance focus, and of course, business processes can feed useful information to such financial calculations. Areas of focus for successful BPM adoption Successful BPM adoption often involves changes in organizational behavior and focus, acquisition of skills in the necessary technology and tools, and implementation of suitable working practices. These practices range from planning to implementation of business processes, working with process instances, and monitoring and management of such processes, including post-implementation process improvement activities. These are areas of focus that are critical for BPM adoption success. Process-centric or process-driven organizations behave differently than others, in that their leaders are strongly committed to business process excellence, and their employees at all levels are better aware how the business conducts itself. Their processing of business transactions has clearer definition, better visibility, and end-to-end traceability. Such organizations make necessary investments in improving their existing processes and creating newer ones faster than their competition. Suitable change in organizational behavior, when warranted, is critical for successful BPM adoption. The implementation of such organizational changes concerns various aspects of organizational development, such as organizational culture, managerial actions and incentive compatibility, and is not strongly tied to a specific BPMS. Mastering adequate skills in a BPMS suitable for the scope of BPM adoption is critical for efficient and successful delivery of individual projects. BPM practice, that is, the discipline and organized activities that lead to successful BPM projects, combines BPM methodology with proper use of tools and can be seen as one of the ways an organization committed to process excellence conducts itself. This article will focus on some of the practice aspects of a BPM project. The scope of a BPM project can also vary from company to company. A BPM project may be limited to simply working on a specific process, either creating a new one or improving an existing one. We would call this a tactical project. On the other hand, a BPM project may be the starting point of a broader scoped BPM adoption that is intended to span multiple sub-organizations and is meant to include families of BPM applications. We would call this a strategic initiative. Of course, you may also be dealing with a BPM project that is one of many being executed under a bigger BPM program. Clearly, your preparation will be somewhat different depending on what type of project you are involved in. Regardless of the scope of your BPM project, an essential step in assuring project success is to identify the Critical Success Factors (CSFs) of your project. You need to also ensure that these CSFs are relevant to the key stakeholders of the project, including those who fund the project or own or use the outcome of the project. Once you know the scope of your BPM adoption, an immediate question is, do you have the right capabilities, both in type and level, to execute the chosen initiative successfully? Oracle's BPM methodology provides a BPM Capability Maturity Model framework to articulate your BPM capabilities. It groups nearly a hundred individual capabilities into eight capability domains: business and strategy, organization, governance, project process and service portfolios, architecture, information, infrastructure, and operations, administration, and management—the first half of this list focuses more on organizational aspects while latter half is more technology focused. Oracle's BPM maturity model also classifies an organization on its level of expertise within each of the capabilities (and thus within each of the capability domains) in one of five maturity levels: Ad-hoc, Opportunistic, Systematic, Managed, and Optimized. The higher the level of maturity, the higher is the ability to execute; conversely, lower levels of maturity identify areas that may require improvement. Target maturity levels for each of the capability domains depend on the scope and goals of a BPM initiative, and any gap between the required and available maturity levels for any of the capabilities, if not remedied, can be a potential source of risk adversely affecting successful execution of the BPM initiative. The following diagram shows capability types and maturity levels per Oracle's BPM methodology: Starting with the right business process Something that begins in the right way has a better chance of ending well. This is no different in the case of BPM projects. So, what process would you pick as the focus of your BPM project? In other words, what are the important process selection criteria? Processes can be characterized by the amount of complexity they exhibit in terms of their suitability for explicit representation (as this is needed for digital modeling), number of activities, amount of logic, diversity of process stakeholders, number and spread of the back end application they connect to, and the type and number of human user interfaces the process needs to support. Process complexity can also be interpreted as a cost and/or risk measure. Processes can also be classified on the basis of the business impact they are likely to make—this is a benefit measure. Thus, processes that have low cost or complexity and a high business impact or benefit are easy picks for starting BPM projects and should be assigned the highest priority. Conversely, processes with high complexity and low business impact should be given the lowest priority. Other possible combinations of process cost and benefit would have intermediate priorities. Of course, this cost-benefit analysis is useful when you have the possibility of choosing one or few processes from a larger set of possible candidate processes. In some cases certain organizational mandates may require you to consider a process which has been prioritized according to more diverse cost-benefit rankings, for example, a process that may be needed for ensuring certain legal compliance. Once a process is chosen for a BPM project, it is advisable for the program or project managers to assess BPM capability maturity of the teams involved in the project in the context of the requirements of that project. Should significant gaps be found between the as-is and the required capabilities, strategies for timely bridging of such gaps should be included as part of the project plan.
Read more
  • 0
  • 0
  • 1724

article-image-different-types-q-replication
Packt
16 Nov 2010
5 min read
Save for later

The different types of Q Replication

Packt
16 Nov 2010
5 min read
There are four basic types of Q replication: Unidirectional Bidirectional Peer-to-peer Event Publishing Replicating to a stored procedure or a Consistent Change Data (CCD) table are a subset of unidirectional replication. Let's look at each of these in more detail. Unidirectional replication In unidirectional replication, we can replicate all of the rows and columns of a source table or we can just replicate a subset of the rows and columns. We cannot really perform any transformation on this data. If we want to perform some sort of transformation, then we would need to replicate to a stored procedure. Replicating to a stored procedure Stored procedure replication is a subset of unidirectional replication in which the target is not a table as such, but a stored procedure, as shown in the following diagram: A stored procedure can transform the data and output the results to a target table. This target table is not known to Q Apply. These stored procedures can be written in SQL, C, or Java. Prior to DB2 9.7 the source table and the stored procedure must have the same name, and the target table name can be any name we like. Bidirectional replication In bidirectional replication, we replicate copies of tables between two servers, each of which has a copy of the table. Note that we can only set up bidirectional replication between two servers. Unlike unidirectional replication, where we can replicate a subset of rows and columns, this is not possible in bidirectional replication. The tables on both servers can have different names, but must have the same number of rows and columns. The columns must have identical column names of compatible data types. It is not possible to do any data transformation using this type of replication. Because we are updating records on both servers, it is possible that the same record will be updated at the same time on both servers. Although Q replication provides a conflict detection mechanism, we strongly advise that the driving application should be written or modified in such a way that such conflicts be avoided. The conflict detection provided by Q replication should be treated as a safety net and not the primary conflict resolution mechanism. This mechanism allows us to choose which data values are used to detect conflicts (key column values only, changed column values, or all column values) and which server should win if such a conflict is detected. The row in the losing system is rolled back and the record is written to the IBMQSNAP_EXCEPTIONS table for review. One of the related subjects to conflict detection is the concept of which server takes precedence in a conflict, or to put it more bluntly, which server is the master and which is the slave! If there is a conflict, then whichever server takes precedence will not apply changes from the other server. This ensures that the servers remain in sync. There is a more egalitarian option, which is that no server takes precedence. In this situation, rows are applied irrespective of whether or not there is a conflict, which ultimately leads to a divergence of the contents of the databases, which is not good! There are two types of bidirectional replication—the first type is where we have an active/passive setup and the second type is where we have an active/active setup. The type of replication you choose will have implications on which server is defined as the master and which as the slave and what to do if a Q subscription is inadvertently inactivated. In an active/passive setup, the passive server should be made the master. In an active/active setup, the choice of which system is the master is a decision you have to make. Peer-to-peer replication Peer-to-peer replication allows us to replicate data between two or more servers. This is different from bidirectional replication, which is only between two servers. Each server has a copy of the table (which can have a different schema and name), but must have the same number of rows and columns and these columns must have identical column names and compatible data types. It is not possible to do any data transformation using this type of replication. In peer-to-peer replication, there is no such thing as a master or slave server—each server will have the most recent copy of the table—eventually! What this means is that there will be a slight delay between the first server having a copy of the table and the last server having that copy. This is an asynchronous process, so at any one time the tables might be different, but once applications stop updating them, then the tables will converge to the most recently updated value. This type of processing means that there isn't any "manual" conflict detection as such (it is handled automatically by Q Apply), because the latest update will always win. If two applications update the same record at exactly the same time, then Q replication uses the server number allocated when the peer-to-peer environment was set up to determine the winner. This type of processing means that two columns are added to each of the tables in the Q replication environment, where the first column is a timestamp of when the row was last updated (GMT) and the second column is the machine number. These updates are performed through triggers on the tables.
Read more
  • 0
  • 0
  • 6568

article-image-updating-software-koha
Packt
16 Nov 2010
4 min read
Save for later

Updating Software in Koha

Packt
16 Nov 2010
4 min read
  Koha 3 Library Management System Install, configure, and maintain your Koha installation with this easy-to-follow guide A self-sufficient guide to installing and configuring Koha Take control of your libraries with Koha library management system Get a clear understanding of software maintenance, customization, and other advanced topics such as LDAP and Internationalization Written in a style that applies to all Linux flavors and Koha versions Orientation to updating software Before we can update the Koha software, let us learn about Koha's software versions and how to choose the version to upgrade to. In this section we also learn about the components of a software update, and how to install each component of the update properly. Understanding Koha's software versions To choose which new version to upgrade to, let us first understand how the Koha software is organized. Branches At any given point Koha has at least two main software branches: Stable: This branch is older and is considered stable or bug free for the most part. Only bug fixes are allowed on this branch. Development: This branch is where new features are developed. This branch is ahead of the stable branch, meaning it has all the features of the stable branch and the new features in development. Heads Both branches—stable and development have heads. A heads is the tip of the branch, pointing to the latest change made in that branch. At the time of writing of this article, there are two heads available in Koha's Git repository. 3.0.x: This is the tip of the stable branch master: This is the tip of the development branch Tags Both branches have multiple tags. Tags point to specific points in a branch's change history. For instance we see these tags related to the stable branch: v3.00.06: This is the latest stable branch v3.00.05: An earlier version of the 3.0.x branch v3.00.04: An earlier version of the 3.0.x branch v3.00.03: An earlier version of the 3.0.x branch And these tags are available for the development branch: v3.02.00-beta: This is the 3.02 branch in the beta testing stage v3.03.00-alpha: This is the 3.02 branch when released for alpha testing Choosing a version to update to We can choose to move to the head of the stable branch or the head of the development branch or to any tag in one of these branches. Here are some pointers to help you decide: On production servers, we upgrade to the latest stable tag in the stable branch To take an early look at new features being developed, switch to the alpha or beta tag in the development branch, if available If you want to take a look at the very latest version of the software, switch to head of the development branch Understanding components of software updates When bugs are fixed or new features are added in Koha, different types of files and programs can change such as these: Perl, Java script, HTML, CSS, and other types of files in kohaclone folder Tables, columns, constraints, indexes, system preferences, and other types of changes in Koha's database Indexes and properties in Zebra configuration files Directives in Koha's Apache2 configuration files An overview of the installation process To ensure that software updates are installed properly, we need to follow these steps: Download software updates: We can download updates using Git. Git automatically detects our current version and downloads updates from Koha's online repository. Switch to a specific software version: Depending on our purposes, we will choose a version that we want to upgrade to. Install Perl module prerequisites: The new version of the software may depend on new Perl modules; we will need to install these. Install the new version of Koha: We will install the new Koha version using the make utility; this process is similar to that of a fresh Koha install. Configure Apache2: The new version of the software may have an updated Apache2 configuration file. We will need to configure this new file. Upgrade the database: We will use Koha's web installer to upgrade the database to the new version. Rebuild Zebra indexes: The new software version may contain updates to Zebra configuration files. To have these changes reflected in search results, we will need to do a full rebuild of Zebra's indexes. Restart Zebra server: To load new Zebra configurations we will have to restart zebrasrv.
Read more
  • 0
  • 0
  • 2936

article-image-introducing-graphic-menu-typo3
Packt
16 Nov 2010
9 min read
Save for later

Introducing Graphic Menu in TYPO3

Packt
16 Nov 2010
9 min read
TYPO3 Templates Create and modify templates with TypoScript and TemplaVoila Build dynamic and powerful TYPO3 templates using TypoScript, TemplaVoila, and other core technologies. Customize dynamic menus, logos, and headers using tricks you won’t find in the official documentation. Build content elements and template extensions to overhaul and improve TYPO3’s default back-end editing experience. Follow along with the step-by-step instructions to build a site from scratch using all the lessons in the book in a practical example. Our graphical menu, GMENU, has the ability to use a TYPO3 class, GIFBUILDER, to create images on the fly. We are going to look at GIFBUILDER in depth in just a moment, but the basic idea is that GIFBUILDER can help us build complex graphics for our menus dynamically so that we can use fonts that are not be supported by all browsers, build button-like graphics, and use drop-shadows and embossing for effect. This means that we don't need to update Photoshop every time that we want to change the menu titles or replace the font, and we also don't have to learn or use Flash or JavaScript just to create flexible menu titles. We gain a lot of freedom and power with GMENU, but it does have some disadvantages compared to TMENU. Depending on our needs, we will be generating an image for every state (normal, rollover, active, and so on), for each menu item anytime we make a change. The nice thing is that TYPO3 will cache our images, so they are only generated after we make a change and reset the cache. Overall, we will use the server a little more heavily anytime we reset the cache, and our users will need to download images for each menu item. The last disadvantage is just that it is more complex than TMENU. If our frontend developers or designers have already provided us with some awesome CSS/JavaScript or Photoshop images, then we may only need a text-based menu. In return for those possible disadvantages, we will get freedom and cross-browser compatibility, so let's see what we can do before we make any decisions. Introducing GIFBUILDER GIFBUILDER is a universal object in TypoScript that uses some basic TypoScript code to generate images using the ImageMagick (or GraphicsMagick) library in PHP. Generating images with ImageMagick is normally very complex, and we would have to learn a fair amount of PHP to make anything. Using GIFBUILDER, makes it relatively easy to make these same dynamic images without learning PHP or opening Photoshop. GIFBUILDER can actually be used for any images that we would want to create in TypoScript, but we are going to be using it specifically for GMENU in this article to turn our text fields into typographic images complete with layers and effects. We are going to learn about three main objects in GIFBUILDER that will help us create our menu items: Boxes: We can layer simple boxes to make borders or button effects. Images: We can use uploaded or external image files as backgrounds or just display them as menu items. Text: Most importantly, we can use text objects to show our page titles in non-web fonts with drop-shadow or emboss effects. A complete list of the properties available to GIFBUILDER is beyond the scope of this article, and not really necessary to build most menus. If you have any problems with GIFBUILDER, you may need to check your ImageMagic configuration in the TYPO3 Install Tool. The BOX object The BOX object is one of the key TypoScript objects in GIFBUILDER. The BOX object is, like it sounds, just a simple graphical box defined by its size and color. By itself, it's not that helpful, but we can add boxes as layers to generate borders and backgrounds that will be flattened into our final generated images. We are only going to use two properties for our boxes: BOX.dimensions defines the dimensions of the box in the format x, y, w, h where x, y is the offset for the top right-corner and w, h is the width and height of the box. BOX.color defines the color of the inside of the box. Here is an example of a gray box, 400 pixels wide, 20 pixels tall, and offset 3 pixels down and to the right: lib.subMenu.1.NO { 5 = BOX 5.color = #aaaaaa 5.dimensions = 3,3,400,20 } The IMAGE object The next object we can use, IMAGE, will bring in an image for normal display or basic tiling and masking. The IMAGE object can be used for complex displays, but we are only looking at menu applications and will just look at a few options: The TEXT object Finally, we're going to look at the options for a TEXT object in GIFBUILDER. TEXT objects are used to display any text we want in GIFBUILDER, but will be mainly using them to show the title of each page as a menu item. This list of properties is much more exhaustive because this would obviously be one of the most important objects to customize when we're creating a menu using graphical text: GIFBUILDER layers We work with GIFBUILDER by creating new objects for the GIFBUILDER, designing them with properties, and layering them by number values. Each layer is stacked in ascending order (larger numbers on top), and then TYPO3 generates a final image by flattening all of the layers into one image. It sounds a little complex, but look at this example: lib.subMenu.1.NO { 5 = BOX 5.color = #aaaaaa 5.dimensions = 3,3,400,20 10 = TEXT 10.text.field = title 10.fontSize = 12 } In the example that we just saw, lib.subMenu.1.NO is our GIFBUILDER object. Although the numbers used to identify objects (5 and 10 in the example) are sometimes arbitrary in TYPO3, they are very important for GIFBUILDER because they define the ordering in layers. GIFBUILDER stacks it's subobjects from lowest number to highest. So, in the example that we just saw, TYPO3 is generating an image in a logical sequence: A gray box is defined. The dimensions of the gray box are defined to make it 400 pixels wide and 20 pixels. A text object is created on top of the gray box to show the title field of the page from the menu item. The size of the text for the title is set to 12 pixels. TYPO3 generates a flattened image of our menu item title in a gray box. Using this system, we can stack very simple objects on top of each other to draw basic buttons. GIFBUILDER properties The GIFBUILDER object will apply itself to all items in a GMENU menu. For the basic GIFBUILDER object, we are only going to look at two properties: XY defines the size of the image (width and height) backColor defines the background color for the entire image The interesting trick for XY (and some of the other dimension properties) is that it can be based on hard-coded numbers and TypoScript constants, or it can be a calculation based on the size of another item. In the following code, the size of the GIFBUILDER object is tied directly to the size of the TEXT object declared below it: 10 = TEXT 10.text.field = title XY = [10.w]+10,[10.h]+10 The references [10.w] and [10.h] read the current width and height of the object associated with 10. Then, we add 10 pixels onto each one to give ourselves a little bit of room for spacing. We'll use this technique in GMENU to make sure that our boxes and graphic objects always line up with our titles. GMENU properties The first thing that you'll probably notice going from TMENU to GMENU is that we are about to multiply the number of properties at our disposal dramatically. We've already covered the common menu properties. We're just going to cover the most basic or necessary properties in the following tables to get an idea of what we can do. If it looks intimidating, don't worry. Most of the properties are created logically and build upon our earlier knowledge. Most importantly, there's no requirement to learn all of GIFBUILDER before we start playing around. The menu object itself has just a few key properties that we need to look at: Creating our first graphic menu The first change we can accomplish is updating our main menu with a custom font and some rollover functionality. We can do that with minimum fuss, and it'll update our whole look nicely. I chose a freeware font from Larabie Fonts (http://www.larabiefonts.com) called Deftone because it'll show off GIFBUILDER, and my boss loves it. You can use any TrueType font file you would like, though. Some fonts seem to work better with ImageMagick then others, so you may need to experiment. In any case, let's start updating our menu: We need to change lib.mainMenu.1 = TMENU to lib.mainMenu.1 = GMENU to use the GMENU objects. We want a consistent height for our entire menu, so we'll enable useLargestItemY in our template: lib.mainMenu.1.useLargestItemY = 1 Let's update the normal menu state first. We won't be using the div tags around our menu items, so want to add a class to our images: lib.mainMenu.1.NO.ATagParams = class="menu-link" We can set the background color and dimensions of our menu items. We are going to use 10 for our text object, so we can go ahead and use that as part of the size calculation to make our items exactly the same width and 5 pixels taller than the text: lib.mainMenu.1.NO { backColor = #ffffff XY = [10.w],[10.h]+5 } Now we can create the TEXT object. This is our main menu, so we're just going to use the title as our text content. We're also going to use the Deftone font at a size of 36 in a classic black: lib.mainMenu.1.NO { 10 = TEXT 10.text.field = title 10.fontFile = fileadmin/templates/deftone.ttf 10.fontSize = 36 10.fontColor = #000000 10.align = left } The main menu is already looking better, but we can add some flair by tilting the text up with the angle property. Because of the angle changing the dimensions, we'll push the text down a little more by adding a 50 pixel offset to the height: lib.mainMenu.1.NO { 10.offset = 0,50 10.angle = 3 } After all of our modifications, this is what our menu should look like:
Read more
  • 0
  • 0
  • 1985

article-image-packt-enterprise-microsoft-dynamics-books-2010
Packt
16 Nov 2010
1 min read
Save for later

Packt Enterprise - Microsoft Dynamics Books 2010

Packt
16 Nov 2010
1 min read
Dynamics NAV Dynamics GP Dynamics AX   Microsoft Dynamics NAV 2009 Programming Cookbook Microsoft Dynamics GP 2010 Reporting Quality Assurance for Dynamics AX 2009 Administration   Microsoft Dynamics NAV Administration Microsoft Dynamics GP 2010 Implementation   Microsoft Dynamics AX 2009 Programming: Getting Started   Microsoft Dynamics NAV 2009 Application Design Microsoft Dynamics GP 2010 Cookbook   Microsoft Dynamics AX 2009 Development Cookbook   Programming Microsoft Dynamics NAV 2009   Microsoft Dynamics AX 2009 Administration   Implementing Microsoft Dynamics NAV 2009  
Read more
  • 0
  • 0
  • 909
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 €18.99/month. Cancel anytime
article-image-introducing-hierarchical-menu-typo3
Packt
16 Nov 2010
6 min read
Save for later

Introducing Hierarchical Menu in TYPO3

Packt
16 Nov 2010
6 min read
TYPO3 Templates Create and modify templates with TypoScript and TemplaVoila Build dynamic and powerful TYPO3 templates using TypoScript, TemplaVoila, and other core technologies. Customize dynamic menus, logos, and headers using tricks you won’t find in the official documentation. Build content elements and template extensions to overhaul and improve TYPO3’s default back-end editing experience. Follow along with the step-by-step instructions to build a site from scratch using all the lessons in the book in a practical example. Page tree concepts We are about to dive into all of the little details, but there are a few basic concepts that we need to review first. So, we're going to make sure we have a more complete definition that avoids any confusion: Page tree: Our TYPO3 page tree is all of the pages and folders that we work with. This includes the home page, about us, subpages, and even non-public items such as the storage folder in our example site. If we have a very simple website it could look like this: Home About Us Staff Level: Our page tree will almost always have pages, subpages, and pages under those. In TYPO3, these are considered levels, and they increase as you go deeper into the page tree. For example, in our extremely simple website from the example above both Home and About Us are at the base (or root) of our page tree, so they are on level 0. The staff page is underneath the About Us page in the hierarchy, so it is on level 1. If we added a page for a photo gallery of our last staff lunch as a subpage to the staff page, then it would be at level 2: Home (Level 0) About Us (Level 0) Staff (Level 1) Staff Lunch Gallery (Level 2) Rootline: TYPO3 documentation actually has a few different uses for the term "rootline", but for the menu objects it is the list of pages from your current page or level moving up to the root page. In our example above, the current rootline from the Staff Lunch Gallery is Staff Lunch Gallery | Staff| About Us Before we look at all the different kinds of menus in TYPO3 and all their little differences, we need to explore the base TypoScript object for all of them: HMENU. HMENU generates hierarchical menus, and everything related to menus in TYPO3 is controlled by it. As the base object, HMENU is the one thing that every type of menu is guaranteed to have in common. If we understand how HMENU is creating its hierarchical menu, then everything else is just styling. We can already see an example of HMENU being used in our own TypoScript template setup by looking at the menus that the TemplaVoila Wizard generated for us: ## Main Menu [Begin] lib.mainMenu = HMENU lib.mainMenu.entryLevel = 0 lib.mainMenu.wrap = <ul id="menu-area">|</ul> lib.mainMenu.1 = TMENU lib.mainMenu.1.NO { allWrap = <li class="menu-item">|</li> } ## Main Menu [End] ## Submenu [Begin] lib.subMenu = HMENU lib.subMenu.entryLevel = 1 lib.subMenu.wrap = <ul id="submenu-area">|</ul> lib.subMenu.1 = TMENU lib.subMenu.1.NO { allWrap = <li class="submenu-item">|</li> } ## Submenu [End] We can see that the wizard created two new HMENU objects, lib.mainMenu and lib.subMenu, and assigned properties for the entry level and HTML tags associated with each menu. We're about to learn what those specific properties mean, but we can already use the code from the wizard as an example of how HMENU is created and how properties are defined for it. Types of menu objects The HMENU class does not output anything directly. To generate our menus, we must define a menu object and assign properties to it. In our current menus, the TemplaVoila Wizard generated a menu object for each HMENU in the following highlighted lines: ## Main Menu [Begin] lib.mainMenu = HMENU lib.mainMenu.entryLevel = 0 lib.mainMenu.wrap = <ul id="menu-area">|</ul> lib.mainMenu.1 = TMENU lib.mainMenu.1.NO { allWrap = <li class="menu-item">|</li> } ## Main Menu [End] ## Submenu [Begin] lib.subMenu = HMENU lib.subMenu.entryLevel = 1 lib.subMenu.wrap = <ul id="submenu-area">|</ul> lib.subMenu.1 = TMENU lib.subMenu.1.NO { allWrap = <li class="submenu-item">|</li> } ## Submenu [End] There are a handful of classes for menu objects that can be used by HMENU to generate menus in TYPO3, but we are going to be concentrating on the two most powerful and flexible options: TMENU and GMENU. The TemplaVoila Wizard used TMENU in our current menu, and it is used to generate text-based menus. Menus built with TMENU output the title of each page in the menu as a text link, and then we can use HTML and CSS to add styling and layout options. Menus created with the GMENU class are considered graphic menus. We can use GMENU to dynamically generate images from our page titles so that we can use fancy fonts and effects like drop-shadow and emboss that are not supported in CSS by all browsers equally. Menu item states The menu system in TYPO3 allows us to define states for different menu options. For example, using the state definitions, we can customize the behavior of menu items when they are active or rolled over. The normal state (NO) is available and set by default, but all of the menu item states must be enabled in TYPO3 by adding code to our template like this: lib.mainMenu.1.ACT = 1. All menu objects share a common set of menu item states from the table below: HMENU properties Because HMENU is the root of all of our other menu objects, any of the properties that we learn for HMENU will be applicable to all of our menu options that we might use on future websites. I've included a list of the TypoScript properties that we are most likely to use in the TypoScript template setup, but you can see the complete list in the TSref (http://typo3.org/documentation/document-library/references/doc_core_tsref/current). If you haven't used TypoScript much, and this is too much information all at once, don't worry. It will make more sense in a few pages when we start experimenting on our own site. Then, this will serve as a great reference. As we've already witnessed in the main menu, TYPO3 sorts our menu by the order in the page tree by default. We can use this property to list fields for TYPO3 to use in the database query. For example, if we wanted to list the main menu items in reverse alphabetical order, we could call the alternativeSortingField in our template: lib.mainMenu.1 = TMENU lib.mainMenu.1.alternativeSortingField = title desc
Read more
  • 0
  • 0
  • 3042

article-image-apache-roller-40-creating-theme
Packt
15 Nov 2010
11 min read
Save for later

Apache Roller 4.0: Creating a Theme

Packt
15 Nov 2010
11 min read
  Apache Roller 4.0 – Beginner's Guide A comprehensive, step-by-step guide on how to set up, customize, and market your blog using Apache Roller   Create, optimize, and maintain your own blog server using Apache Roller Incorporate multimedia content from popular web tools like YouTube, Google Maps, Twitter. and SlideShare in your posts Customize the appearance of your blog with visually appealing, powerful themes and templates Increase your blog's search engine ranking and keep track of visitors using Google Webmaster Tools         Read more about this book       For the following exercise, you'll need to download Chapter 7's support code from the book's website. Extract the chapter07.zip file's contents into a directory in your hard disk. For example, I used Ubuntu Linux in the exercise, created a chapter07 directory inside my Desktop directory, and copied the mytheme directory inside Desktop/chapter07. All the steps in the exercise are based on these assumptions. Creating a directory for your theme Every Roller theme has a directory and some required files such as weblog.vm, _day.vm, and theme.xml. The next exercise will show you how to create a directory for your new theme inside Roller's themes directory, and how to copy these required files from the support files. Time for action – creating a directory for your theme Now, I'll show you all the necessary steps to create your new theme directory inside Roller's themes directory in a Linux Ubuntu system, and then copy all the required files. If you're using Windows or any other flavor of Linux, the procedure is very similar: Go to your Roller themes directory and create a directory named mytheme: Open a terminal window, go to the themes subdirectory inside Desktop/chapter07, and type sudo cp * /usr/local/tomcat/webapps/roller/themes/mytheme to copy all the mytheme files to your Roller installation: In the end, your mytheme directory will have four files, as shown in the following screenshot: Now restart Tomcat and wait until it's running again. Then open your web browser, log into Roller, and go to the Design tab to see the Weblog Theme page: Click on the Shared Theme option and select My First Roller Theme from the drop-down listbox: Click on the Update Theme button to change your current Roller theme, and then click on the See how your blog will look with this theme link: Roller will open a new web browser tab to show you a preview of the new theme you selected: Close the preview tab and leave the Front Page: Weblog Theme page open for the next exercise. What just happened? The mytheme theme has a very basic functionality. That's because the CSS stylesheet (mystylesheet.css) is empty, so I'm going to show you how to add styles to your headings, links, and all the other elements displayed in your weblog. However, first we need to see a quick introduction to the four files that every Roller theme must have in order to run without any trouble: File Definition Tip weblog.vm Describes the main page of your weblog. In this file, you set the structure for your weblog, using macros and elements from Roller and the Velocity template language. _day.vm   Describes how to display one day's worth of entries in your weblog. Here you can configure how to display each entry's title, content, and comments, for example. You can set the font's color and size of each element, based on the CSS stylesheet definitions. mystylesheet.css Stylesheet override file that defines the CSS style code used by your weblog. Here you define all your weblog's styles, such as size and color for headings and fonts used in your posts. theme.xml Theme definition file that describes each file used in your weblog. You need to include some basic data about your theme, the stylesheet file, the weblog and _day templates, and every other file and/or resource used in your weblog. The stylesheet override file The first thing we need to do in order to change your new theme's visual appearance is edit the stylesheet override file: mystylesheet.css. We can do this in two ways: Edit the file directly from the mytheme directory inside Roller's themes directory, or use Roller's Custom Theme feature. If we use the first option, we'll need to restart Tomcat every time we make a modification to mystylesheet.css. On the other hand, if we choose the second option, we can edit the stylesheet inside Roller's admin interface and see how our changes affect our weblog's visual appearance immediately, so I'm going to show you how to use the second option. Time for action – editing the stylesheet override file It's very easy to edit the stylesheet override file for your custom theme inside Roller, and the next exercise will show you how to do it: Go to the Front Page: Weblog Theme tab in your web browser, select the Custom Theme option, click on the I want to copy the templates from an existing theme into my weblog checkbox, and click on the Update Theme button: Roller will show you the following success message: Now click on the Templates link to see a list of the templates you currently have in your custom space: Looking at the template list in the previous screenshot, there are some templates from the other custom theme and we need to remove them now. Click on the Remove link of the custom.css, mytemplate, and _css templates to delete them from your custom space, as we won't need them anymore, and they don't belong to mytheme. After removing all the unneeded files, there should be only two templates in your list: Now click on the Stylesheet link to see and start editing your mystylesheet.css file's code: As you can see, your custom stylesheet is empty. If you click on the Front Page link in Roller's menu bar, you'll see your weblog's current front page: Now click on your web browser's Back button to return to the stylesheet editing page, and add the following code to your custom stylesheet: div.dayTitle { color:brown; font-weight:bold; font-size:90%; text-transform:uppercase; border-bottom:1px dotted #666;}.entryTitle { font-weight: bold;} Your stylesheet should now contain the line beginning with /*, along with the code you've just entered: Click on the Save button to apply the changes to your stylesheet, and then select the Front Page link to see how the code you entered affects your weblog's visual appearance: If you compare the previous screenshot with the one from step 7, you'll see that the code you entered into the override stylesheet changed the way your weblog displays the day and entry titles. Now click on the Back button of your web browser to return to the stylesheet editing page, and add the following lines of code above the lines you entered in step 8: a { text-decoration: none;}a:link { color: blue; font-weight: medium;}a:visited { color: purple; font-weight: medium;}a:hover { text-decoration: underline overline;}body { font-family:"Lucida Grande", lucida, Geneva, Arial, sans-serif; background:#FFFFCC;} Your stylesheet should now look like this: Click on the Save button and then select the Front Page link to see your weblog's front page: Click on the Back button to return to your stylesheet editing page. What just happened? In the previous exercise, you edited your stylesheet override file (mystylesheet.css) to change your weblog's visual appearance. To understand what these code segments do, let's take a look at the _day template's code: <div class="dayBox"> <div class="dayTitle"> $utils.formatDate($day, "EEEE MMM dd, yyyy") </div> #foreach( $entry in $entries ) <div class="entryBox"> <p class="entryTitle">$entry.title</p> <p class="entryContent"> #if($model.permalink) $entry.displayContent #else $entry.displayContent($url.entry($entry.anchor)) #end </p> <p class="entryInfo"> Posted at <a href="$url.entry($entry.anchor)">$utils.formatDate ($entry.pubTime, "hh:mma MMM dd, yyyy")</a> by $entry.creator.userName in <span class="category">$entry.category.name</span> &nbsp;|&nbsp; #if ($utils.isUserAuthorizedToAuthor($entry.website)) <a href="$url.editEntry($entry.anchor)">Edit</a> &nbsp;|&nbsp; #end #if($entry.commentsStillAllowed || $entry.commentCount > 0) #set($link = "$url.comments($entry.anchor)" ) <a href="$link" class="commentsLink">Comments[$entry.commentCount] </a> #end </p> </div> #end</div> The lines in bold are the ones directly involved with the CSS code you entered in the exercise: <div class="dayTitle"> $utils.formatDate($day, "EEEE MMM dd, yyyy")</div> The div element represents a "division" or a section in a web page. The only code inside this division is $utils.formatDate($day, "EEEE MMM dd, yyyy"). This is a property from the $utils object used to show the date and time of each day containing one or more posts in the weblog, in the format specified by the "EEEE MMM dd, yyyy" string. The class="dayTitle" code segment indicates that this division will use the styles defined in the .dayTitle class from the stylesheet: div.dayTitle { color:brown; font-weight:bold; font-size:90%; text-transform:uppercase; border-bottom:1px dotted #666;} This CSS code indicates that every text element inside this division will be shown in brown color, in bold style, with a smaller size (90%) than the other fonts outside the division, and the text will be converted to uppercase. The last CSS element indicates that there will be a one pixel-wide, dotted grey border at the bottom of each text element (#666 is a hexadecimal color code). All this stuff means that each day in the weblog will be shown like this: Now, the next line in the _day template: <p class="entryTitle">$entry.title</p> The <p> HTML tag indicates a paragraph inside your web page, and $entry.title is the only code inside this paragraph. As we saw before, $entry.title shows the title of an entry in your weblog. The class="entryTitle" element is related to the .entryTitle code block in your stylesheet: .entryTitle { font-weight: bold;} This CSS code indicates that all the text inside the paragraph will be shown in bold. In this case, each entry's title of your weblog will be shown in bold: The rest of the bold lines in the _day template use an <a> element, known as an anchor in HTML. This element is used to display links in web pages, and is related to all the a elements in the stylesheet: a { text-decoration: none;}a:link { color: blue; font-weight: medium;}a:visited { color: purple; font-weight: medium;}a:hover { text-decoration: underline overline;} These elements define how the links in your weblog will be displayed. The first block of code indicates that the links won't have a text decoration (that is, links won't be underlined, as in most web pages), the color of each link will be blue, the font weight will be medium, and the color of visited links will be purple. The last block of code indicates that, if someone positions the mouse cursor over a link, it will be underlined and overlined. The following screenshot shows what happens when you put your mouse cursor over the date and time hyperlink created with the <a href="$url.entry($entry.anchor)">$utils.formatDate($entry.pubTime, "hh:mma MMM dd, yyyy")</a> line in the _day template: You can see the underline and overline effects from the a:hover CSS element, along with the purple color due to the a:visited CSS element. The <a href="$url.editEntry($entry.anchor)">Edit</a>  |  line from the _day template has similar effects: The last block of code we used in the previous exercise is: body { font-family:"Lucida Grande", lucida, Geneva, Arial, sans-serif; background:#FFFFCC;} In this case, the body CSS element defines the font used to display your weblog's data. There are several fonts included, to maximize browser compatibility. You can experiment with different fonts and font families to see how your changes affect your weblog's way of displaying data. Summary In this article we saw how to create a Roller theme from scratch. We also saw how to edit the mystylesheet.css stylesheet override file and how the _day.vm template uses CSS styles and Velocity code to display your weblog's data.
Read more
  • 0
  • 0
  • 2276

article-image-drupal-6-theme-engines-and-sub-themes
Packt
15 Nov 2010
8 min read
Save for later

Drupal 6: Theme Engines and Sub-themes

Packt
15 Nov 2010
8 min read
  Drupal 6 Theming Cookbook Over 100 clear step-by-step recipes to create powerful, great-looking Drupal themes Take control of the look and feel of your Drupal website Tips and tricks to get the most out of Drupal's theming system Learn how to customize existing themes and create unique themes from scratch 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 Drupal, see here.) Introduction One of the more prevalent adages with respect to Drupal development and theming is: Do not hack core! Modules, themes, and other files which come with a stock Drupal installation should never be edited directly. In other words, we really should not need to modify anything outside the sites folder which is designed to contain all our changes and customizations. The reasoning behind this is that most, if not all, aspects of core are accessible and modifiable through a clean and non-invasive process using Drupal's APIs. Therefore, hacking core modules and themes to get things done is almost always unnecessary and ill-advised. Another reason why directly editing core modules and themes, or for that matter, even contributed modules and themes, is that whenever an upgrade of Drupal or said modules and themes takes place, we will very likely be overwriting the changes we have made, or at the very least, make the upgrade a trying exercise. With respect to themes, let us take the example of a core theme such as Garland. As previously mentioned, it is a poor practice to edit the theme directly. The Drupal way is to extend the existing core theme using a sub-theme which, by default, is more or less an identical copy. This sub-theme can then be extended further and customized by overriding elements of the base theme,such as its stylesheets, template files, template variables, and so on. In this article, we will look at the building blocks of a basic theme and then familiarize ourselves with the concept of the sub-theme and the various techniques available to extend, override and modify it according to our requirements. Understanding the anatomy of a theme Drupal themes can consist of a multitude of files each with its own purpose, format, and syntax. This recipe will introduce each of these types with an explanation of what they do. Getting ready It will be useful to navigate to the Garland folder at themes/garland to browse and view the files inside a typical, fully featured theme. Garland also uses the PHPTemplate theming engine which is the most commonly used and recommended engine across Drupal's core and contributed themes. How to do it... The following table outlines the types of files typically found inside a theme's folder and the naming conventions to be followed for some of them. Type Mandatory? Description mytheme.info Yes Configuration file which provides information to Drupal about a theme named mytheme. page.tpl.php Yes A template file which determines the layout of all Drupal pages. node.tpl.php No A template file which determines the layout of a node inside a Drupal page. block.tpl.php No A template file which determines the layout of a block. *.tpl.php No Other template files which allow the customization and styling of themable aspects of Drupal. style.css No CSS stylesheet-if this file exists, it will be automatically included in the theme. script.js No Javascript file-if this file exists, it will be automatically included in the theme. *.js No Other Javascript files which will need to be explicitly included in the .info file. favicon.ico No Shortcut icon-if this file exists, it will be automatically included in the theme unless overridden from within Drupal. logo.png No Site logo-if this file exists, it will be automatically included in the theme unless overridden from within Drupal. screenshot.png No Theme preview image-if this file exists, it will be automatically included in the theme. template.php No PHPTemplate master file where some of the more complicated and powerful tweaks and overrides occur. Perusing the contents of each of the available files will prove very useful as we go along developing our theme. How it works... When a theme is added, Drupal first parses its .info file. This file, as its extension suggests, provides information about the theme such as its name, Drupal version compatibility, regions declared, CSS stylesheets used, JavaScript files included, and so on. In other words, Drupal uses it to find out the configuration and features of a theme. The .info file also specifies the theming engine being used by the theme which, by default, is PHPTemplate. Theme engines allow theme developers to communicate with Drupal using a simpler and more convenient interface commonly via template files. A number of them also introduce their own language formats for use in these template files. Template files in PHPTemplate themes are those that use the .tpl.php extension. Unlike other engines, these files just use PHP and HTML and do not rely on any special markup languages. There's more... Other theme engines besides PHPTemplate are also available. However, only a handful of themes in Drupal's contribution repository rely on them. Other theme engine types The PHPTemplate engine is the most widely prevalent theming engine used in the Drupal ecosystem and is a part of the Drupal core package. Themes using other engines such as Smarty or Xtemplate are rare and will be structured quite differently. A list of engines can be found at http://drupal.org/project/Theme+engines. Engine-less theme The Chameleon theme which is a part of core is a theme which does not use a templating engine and relies on straight PHP to get things done. Creating a sub-theme based on a core theme This recipe details the steps involved in creating a sub-theme of an existing core theme. Getting ready Create a folder named mytheme inside sites/all/themes. This name is usually also the name of the new theme and it is best to keep things uncomplicated by not using spaces and special characters. While mytheme is suitable for the purpose of this recipe, it will be a good idea to give the theme a unique and pertinent name based on its design and use. It is also important to ensure that there are no name-conflicts with other existing core or contributed themes. How to do it... A sub-theme of a core theme can be created through the following procedure: Create a file named mytheme.info inside the mytheme folder. Edit this new file and add the following code inside it: name = Mythemedescription = My new sub-theme (CSS, phptemplate, 3-col)base theme = garlandcore = 6.xengine = phptemplatestylesheets[all][] = mytheme.css It is useful to add an informative description field as it will be visible in the theme administration page. Specifying the key characteristics of the theme can save time and effort as the administrator gets a quick overview of the design. Save the file. Create an empty CSS file named mytheme.css inside the mytheme folder. Next, visit admin/build/themes (Home | Administer | Site building | Themes) to check if our new theme is available. As the preceding screenshot attests, the theme administration page should now include our new theme—Mytheme. Enabling it should confirm that it is more or less identical to Garland and can now be extended further as per our requirements. How it works... Drupal uses the .info file to learn about our new sub-theme. The name and description variables, rather unsurprisingly, represent the name of the theme and a description that customarily includes details about the layout of the theme. The base theme variable denotes the parent theme which our sub-theme is based on. By using this variable, we are informing Drupal that it should use the layout and styling of the base theme—in this case Garland—unless we indicate otherwise. This process is commonly referred to as overriding the base theme. Finally, the core variable denotes the compatibility of our theme with Drupal 6, while engine indicates that the theme uses PHPTemplate as its templating engine. PHPTemplate is the most widely used system. Other engines, which include Smarty, PHPTal, and Xtemplate, are seldom used and themes using them are few and far between. The stylesheets variable declares the CSS stylesheets to be included with the theme. When it comes to sub-themes, the stylesheets of base themes are automatically included unless explicitly overridden. However, due to a quirk in Drupal's theming system, base theme stylesheets are not inherited by the sub-theme unless the latter declares at least one stylesheet of its own. We have worked around this by including an empty stylesheet named mytheme.css. There's more... Drupal core provides an excellent example of a sub-theme based on a core theme. Garland and Minnelli Garland already has a sub-theme named Minnelli which is in a folder titled minnelli inside themes/garland. The difference between the two is that Garland uses a fluid layout while Minnelli is a fixed-width version of the same theme. Chaining Sub-themes can be chained, if necessary. For example, our mytheme could have used Minnelli as the base theme even though it is a sub-theme itself.
Read more
  • 0
  • 0
  • 1986

article-image-kohas-web-installer-crontab-and-other-server-configurations
Packt
15 Nov 2010
6 min read
Save for later

Koha's Web Installer, Crontab, and other server configurations

Packt
15 Nov 2010
6 min read
Executing Koha's web installer In this section of the article, we will learn how to execute Koha's web installer. The web installer performs several important functions such as creating Koha's database structure or populating mandatory administrative settings. It can also populate optional settings and sample data such as MARC frameworks or patron categories. The installer is launched from the staff client interface using Koha's MySQL user and is a series of interactive steps. At the end of the process we will be able to launch Koha's staff interface and its OPAC. Understanding the web installer's functions Koha's web installer performs the following functions: Checks for the existence of Koha's database, the connectivity to the database, and if the database user has the required privilege on the Koha database. Creates Koha's database structure—its tables, relationships between tables, database constraints, and other rules. Accepts user input on important configuration questions such as Language or MARC flavor. Populates the Koha database with several mandatory administrative settings such as the default system preferences. Populates the Koha database with several optional administrative settings and sample data such as MARC bibliographic frameworks, sample libraries, or sample patron categories. Configures Koha catalog search to use Zebra or to use database indexing. Understanding how to execute the web installer Here are some important points to note about executing Koha's web installer: The web installer is launched from the staff interface. We use a MySQL database user and password to login into the installer; this user must have privileges over Koha's database. Choosing the correct MARC flavor—MARC21 or UNIMARC is very important; it is not possible to change this configuration once the database is created. If you are evaluating or testing Koha, you should choose to import most or all of the optional settings and sample data. This way you can start using Koha right away. The optional settings and sample data can be deleted or edited from Koha's staff client at any time, but this can be significant amount of work. If you have made a mistake in the configuration settings and want to start over, simply drop and recreate Koha's database from the MySQL prompt; you will be able to launch the web installer once again. Understanding optional data available for import Let us understand some of the optional setting and sample data that we can choose to install using the web installer. Settings for MARC frameworks MARC frameworks define how data is captured for different types of material. The frameworks control things such as, which MARC fields are used, which of these fields is mandatory, or which fields are under authority control. The installer has three sets of optional settings that we can import: Matching rules: Matching rules are used during import of catalog records to match incoming records to those already in the database. Further action can be taken on matched records such as overwriting old records or adding holdings records. Two matching rules are available: one matches on ISBN and other on ISSN. Fast Add framework: This framework is designed for quickly adding catalog records; it has fewer fields when compared to other frameworks. Simple MARC 21 Bibliographic frameworks: A set of bibliographic frameworks for common types of material such as books, CDs, or serials. Other data Here is a listing of data we can import under the Other data section: Authorized values: Authorized values are lists of values that control data entry into catalog fields. Here we can import lists along with sample values for fields such as collections, shelving locations, or item statuses. Currencies: A set of currencies with sample exchange rates for use in Koha's Acquisitions module. Sample patron types and categories: A set of sample patron categories such as Student, Teacher, or Staff. Patron categories are used to define rules such as membership duration; the categories are also used to define circulation policy such as loan period. Sample Label and Patron Card Data: A set of sample layouts and templates for use in Koha's label and patron card generation, and printing tool. Sample Holidays: A sample set of holidays for use in Koha's calendar. The calendar is used in Koha's circulation module to calculate due dates and fines. Default Item Types: A sample set of item types. Item types are used to define circulation policy such as loan period or fine amount. Sample Libraries: A sample set of libraries, patrons, catalog items, circulation rules are linked to libraries. Sample News Items: A set of sample news items, for display on the OPAC and the staff interface. Default messages or notices: A set of sample notices. These are used in various Koha modules, for instance the Overdue notice can be configured to be sent to patrons with overdue items. Sample Patrons: A set of patron records. Sample Z3950 servers: A sample set of Z39.50 servers such as that of the Library of Congress. These servers are used in Koha's cataloging module for copy catalog records into Koha. Executing the web installer Here are step-by-step instructions on executing the web installer: Log in using the MySQL user and password; in this article we have used the user kohaadmin. In Step 1, choose your language; you should see just one option here—en for English or fr for French. In Step 2, the installer checks the database connectivity and user privileges. In Step 3, the installer populates the database with tables before prompting the user to install basic configuration settings. Select your MARC flavor—Unimarc or MARC 21. It is important to make the right choice here. Consult with your library staff if you are unsure of what to choose. Choose to import optional data related to MARC frameworks. Choose to import other optional data such as authorized values, currencies, or patron categories. Click on Import to install the settings and sample data. Choose to use Zebra or the regular database indexing. Click on Finish to complete the execution of the web installer. Launching Koha Once the installer finishes it should automatically redirect to the staff interface: Log in using the MySQL user and you should see Koha's staff interface home page: To launch the OPAC navigate to the OPAC url and you should see a screen such as this:  
Read more
  • 0
  • 0
  • 3074
article-image-ibm-soa-programming-model
Packt
12 Nov 2010
8 min read
Save for later

The IBM SOA Programming Model

Packt
12 Nov 2010
8 min read
IBM's SOA programming model provides a set of rules and languages that lets you focus on creating an implementation of a business design. The programming model addresses the aspects of service components and the data that is exchanged between services as service data, over a service bus. Now, let us look at the key aspects of this programming model. Service Component Architecture We design and build applications (for example, account opening, loan underwriting, order management, customer care, customer billing, and so on) so that an organization can run their business effectively and efficiently. Applications can be looked at as a collection of software components that are assembled or integrated together for a particular purpose. Ideally, you should have the freedom to implement the different components in the technology of your choice. However, at times you may have to inherit or work with existing systems, technologies, or work with third parties who have a different set of technologies. When you adopt an SOA approach to building applications, these components can be viewed as services. When we look at the constructs that make up a service, two things immediately come to mind: The What part: Data that should be passed to the service and data received back from the service The How part: The mechanism required to realize the service and how it can be invoked or can be made available to a service consumer For each of the previous two questions, there are many standards and programming models and, at times, it may get too overwhelming. This is where an SCA model comes in and mitigates these complexities. SCA is not another programming language or replacement, but rather gives a model to assemble and build SOA applications by choosing any technology specific to the implementation approach. The fundamental goal and premise of SCA is to separate business logic from infrastructure logic. IBM's BPM development tool WID provides the design time environment to build SCA-based applications using a bottom-up (expose services out of existing applications and make them available through the Enterprise Service Bus) or top-down approach (more a business-driven approach to identify the right set of services needed to achieve a larger goal, capability, or solution). Therefore, WID enables architects and developers to spend more time working on solving a particular business problem rather than focusing on the details of which implementation technology to use. BPEL is one of those components that are available in WID to build applications. Defining SCA SCA is a set of specifications that describes a model for building applications and systems using an SOA approach. SCA extends and complements prior approaches to implementing services and SCA builds on open standards, such as web services. SCA divides the steps in building a service-oriented application into two major parts: The implementation of components (including BPEL) that expose (export) services and consume (import) other services The assembly of sets of components to build business applications, through the wiring of references to services SCA uses Service Data Objects (SDO) to represent the business data that forms the request and response values of services, providing uniform access to business data to complement the uniform and consistent access to business services offered by SCA itself. SCA supports bindings to a wide range of access mechanisms used to invoke services. SCA emphasizes the decoupling of service implementation and of service assembly from the infrastructure capabilities, from technology or programming language specifics, and from the details of the access methods used to invoke services. SCA components operate at a business level and use a minimum of middleware-specific APIs. The basic elements of SCA include: Service components Service assembly Service data objects The basic building block in SCA is the service component and represents a business service that publishes or operates on business data. The SCA Component Fundamental Structure figure depicts the essential pieces of a service component definition. A service component can have one or more interfaces with which it is associated. The interfaces associated with a service component advertise the business operations associated with this service. These interfaces can be specified as either Java interfaces or WSDL port type interfaces. The arguments and return types for these interfaces are specified as simple Java types, Java classes, SDOs, or XML Schema (for WSDL port type interfaces). Also, implementation is associated with a service component definition. As the figure indicates, there are multiple language and component types available for implementing a service component. When specifying a component interface, you cannot mix Java and WSDL port type interfaces on the same service component definition. A service assembly deals with the aggregation of components and the linking of components through wiring or wires. Think of the assembly model as how, when building a kitchen, you would assemble various components including kitchen cabinets, sink, appliances, counter top, and so on. The assembly model is independent of implementation language. An analogy would be, you don't care how and where the dishwasher is engineered, manufactured, and built, but rather focus on the features, functions, and durability. As depicted in the following figure, an SCA-based application Order Handling System can be made up of one or many modules and hence one or many components. Components can be combined into composites , a logical construct. In the following figure, we can see that the Order Handling System is made up from two composites, an Order Processing Composite and a Third-Party Shipping Composite. In WID, a composite can be compared to a Service Module, which in essence becomes the basic unit of deployment and administration in WPS or WESB (SCA runtime). A service module typically contains the following artifacts: Module Definition An SCA-specification-defined deployment model for packaging components into a service module. In WID, the sca.module file contains the definition of the module. In the following figure, the Order Processing Composite and Third-Party Shipping Composite are the modules. Service Components Each service component can be implemented in various ways (BPEL, Mediation Flow Component, State Machine, Java, and so on), specified by the implementation definition. Service components can invoke other service components or imports, defined in the current service module as defined by an appropriate reference. A component can have 1..N interfaces. Each service component definition can have zero or more references to other services. In the following figure, the Order Validation Component and Order Handling Component are the service components whose implementations are BPEL and state machine respectively. In WID, the service component definition is included in the <SERVICE_NAME>.component file. Imports and Exports Allows SCA components in one module to invoke SCA components in other modules. A service module can have zero or more imports included with it. Imports have a name and a set of 1 . .N interfaces. A Binding attribute describes how the external service is bound to the current module. Once an import has been defined, other services within the module can reference the imported service as if it was a regular service component defined in the module. In the following figure, the Order Handling Component imports a component from the Third-Party Shipping Composite via a reference. In WID, import definition is included in an <IMPORT_NAME>.import file. Imports can use the following bindings, which can be remote or local: SCA Web service HTTP Messaging (JMS, MQ JMS, generic JMS, MQ) Stateless session bean EIS Exports Allows SCA components in a module to expose their capabilities to components in other modules. In order to invoke any of the services in the order handling application by any client (SCA or non-SCA), the service must be exposed with an export. A service module can have zero or more exports included with it. Export components include a name and a target attribute. A Binding attribute describes how the service is bound externally. In the following figure, the Order Validation Component has an export named Order Validate Export. In WID, import definition is included in an <EXPORT_NAME>.export file. Exports binding can be: SCA Web service HTTP Messaging (JMS, MQ JMS, generic JMS, MQ) Stateless session bean EIS References Inline Stand-alone Interfaces, Business Objects, Java classes, and other components In order to invoke any of the services in the Order Handling System by any client (SCA or non-SCA), the service must be exposed with an export. A service module can have zero or more imports included with it. An import is used to access services that are outside the current SCA module. Once an import has been defined, other within the module can reference the imported service as if it was a regular service component defined in the module. As depicted in the following figure, the service module Order Processing Composite can have zero or more exports included with it. An export is used to expose a particular service to clients, outside the current SCA module. A service may also include a stand-alone references file that includes references to services in the module that can be used by SCA and non-SCA services. An SCA service module is packaged and deployed to the native SCA container strategy provided by WPS. This capability allows a developer not to use any to generate runtime-specific artifacts prior to installing a module. Unlike the previous releases of WPS and WESB, with version 7.0 the native container provides greater performance improvements due to the elimination of ejbDeploy for standard SCA applications.
Read more
  • 0
  • 0
  • 2299

article-image-getting-started-omnigraffle-5
Packt
12 Nov 2010
13 min read
Save for later

Getting Started with OmniGraffle 5

Packt
12 Nov 2010
13 min read
  OmniGraffle 5 Diagramming Essentials Create better diagrams with less effort using OmniGraffle Produce high-quality professional-looking diagrams that communicate information much better than words Makes diagramming fun and simple for Macintosh users Master the art of illustrating your ideas with OmniGraffle Learn to draw engaging charts and graphs to grasp your viewers' attention to your presentations A hands-on guide filled with visual step-by-step examples that cover both the basics and the advanced features of OmniGraffle         What OmniGraffle is—and what it is not OmniGraffle is perhaps the easiest diagramming program available for the Macintosh. As with a lot of productivity tools, the program can be used for more than its intended purposes. You can use OmniGraffle to write a letter to your aunt, or a business report to your boss—as you could use Microsoft Word to create diagrams. There is a good reason why you should let OmniGraffle do your diagramming (and consequently let your word processor do your reporting), and the simple reason is that OmniGraffle specializes in diagrams! OmniGraffle is exceptionally good when it comes to good-looking diagrams. Not only do the diagrams look good, they are easy to make, manipulate, and reuse. Hopefully, you have other productivity tools on your computer such as iWorks Pages™ and Microsoft Word™ which are excellent for writing reports, books, and other texts, so you do not need to use OmniGraffle for writing your texts. There are a few important reasons why you should try to avoid creating diagrams with Microsoft Word, or to a lesser degree, OpenOffice Writer: It's cumbersome to lay out shapes—there's a lot of clicking involved You are limited to the size of your page, and you need to carefully plan your diagram as changing it afterwards can become very work intensive You cannot connect shapes to each other—thus remodelling your diagram involves moving everything around by hand You do not have automatic layout settings—every alignment, every adjustment must be done by hand (and measurement must be done by eye) You have only a limited number of shapes at your disposal It's very cumbersome to adjust shape settings like shadow, line stroke, filling, geometry, and so on, to more than one shape at a time You have limited export options for your diagram If you indeed have created diagrams with a text processor, you'll soon realize that in comparison using OmniGraffle is a walk in the park on a hot summer day with a handsome person by your side. You'll love it so much that you're going to beg anyone to let you create their diagrams for. What's in a name? In the previous diagram we have an oblong, an ellipse, a diamond, and a line connecting the oblong to the diamond. There are several names for the various parts of this diagram. Some people will call these diagram objects, others will call them diagram elements or shapes. In this article, we will primarily use shapes, but you will encounter all three words. Setting up OmniGraffle before you start When you start OmniGraffle, or if you issue the File | New command and get prompted with the Template Chooser as seen next, you should select the Blank template and then click the Set as Default button. By doing this, you'll always get a new blank canvas ready for use instead of having to go through the Template Chooser. If you feel more comfortable always being prompted by the Template Chooser, then you do not have to do anything except click on the New Diagram button. The OmniGraffle workspace Before you continue your quest to become the best OmniGraffler around, we'll have to take a look at the OmniGraffle workspace. The reason for this, is that you need to learn a few OmniGraffle terms that will be used. When working in OmniGraffle your workspace will normally consist of three parts: The canvas, the inspectors, and the stencils. The canvas If your canvas does not look exactly like the one you see next, don't panic as this is just for illustrative purposes. The canvas consists of four parts: The Canvas Toolbar, the Inspector Bar, the Canvas View, and the Style Tray. Even if the canvas consists of several parts, for simplicity's sake this area is also known as the area where you do your diagram drawings. The toolbar The toolbar contains not only access to drawing tools, but also quick access to commonly used functions such as ordering drawing objects. This is how your toolbar may look—if it does not look exactly like this, do not panic—the details are out of scope of this article. In the toolbar, you should for now, concentrate on the tools-selector: From left to right we have the Selection Tool (arrow), the Shape Tool (square), the Line Tool (line), and the Text Tool (A). Depending on the current configuration of the shape, line and text tools, the symbols may differ from what you see in the picture. The inspector bar We'll only show you what the inspector bar looks like. We mention this inspector bar here without getting into details about this tool. The drawing area The drawing area is the actual canvas where you will draw your diagrams. It may be confusing to have the same name for what may seem like two parts of the program—but this is how the Omni Group, the makers of OmniGraffle, have decided to name things. To make things less difficult for you, the article will use the term canvas for the actual drawing area. This is also consistent with what the majority of users will call the area where they are drawing stuff. The drawing area is 100% WYSIWYG—What You See, Is What You Get. If you draw a circle, and print your diagram, a circle will appear on your printed paper. If you want to move your circle around the canvas, just point to the circle and drag it to its new location. The style tray The style tray, found in the lower left of the OmniGraffle window, shows you the current style of a drawing shape such as a circle, square, oblong, and so on. Later in this article, we'll use the style tray to quickly copy the look of one shape onto another shape. The inspector palettes You have four selectors available in the Inspector Palettes. Each selector will have several tools belonging to the selector. The property inspectors will aid you when you need to change the appearance and properties of your shapes. There are also inspectors for changing the properties of the canvas, and the document you are working on. Shown here is the Style inspector. There are several ways to open up the style inspector. You can use the Inspectors | Style menu command, or simply issue the +1 keyboard combination. Most of the inspectors are explained as you learn to use the various tools and techniques. There are various property inspectors that have no corresponding tools, but still are a important factor of your diagrams. Selector and keyboard shortcuts You may also use the inspector symbol () on the toolbar to show and hide the inspector palette. If you decide you have a favorite location in the OmniGraffle window where you like to have your palette show/hide, this acts as a quick toggle. The stencils Stencils are collections of ready-made shapes. These shapes can be simple or they can be complex. They are great time savers when working on diagrams with more complex shapes than squares and circles. If you cannot see the stencil palette shown on the right, you can use the +0 keyboard shortcut, or click on the stencil symbol () on the canvas toolbar. Note that this can function as a palette show/hide, similar to the inspector, previously. A stencil often has a name denoting its theme. OmniGraffle comes with a few of these themes like a stencil with ready-made furniture you can use for planning your living room—or if you need to create a really good looking organizational chart, there are stencils for this also. When you install OmniGraffle, you will have a nice starter set of stencils available. These are very suitable for getting you going, and even the most seasoned OmniGraffle users, will often create their diagrams using only these basic stencils. There is a huge library of ready-made stencils that you can import directly into OmniGraffle, making your diagramming even more efficient, and specific to your personal and work needs. Using a stencil is very easy: Just find the right stencil from the Stencil library, select the shape you want to use—and then drag it onto the canvas. Your first diagram The saying goes: a picture is worth a thousand words. When dealing with diagrams, the same point is true: a good diagram saves a thousand words. In this section, you will draw your first diagram. We'll build the diagram from scratch to a finished product, and along the way explain what you need to do. If you follow each step without deviation, you will get a good background on a lot of the possibilities that are present in the OmniGraffle program. It is thus better to experiment after the diagram is done, rather then when you are working your way through the various steps. Our first diagram is going to describe the workflow for publishing information on an imaginary company's web page. To set the stage we need to introduce some actors and publishing rules. First out is the writer. This person is actually writing content to be published. However, a writer is not allowed to publish information on the web without being checked by the editor. Unless the article being published is to be put on the front page, the editor does not need any permission to publish. If the article is to be published on the front page, then the Director of Communication needs to give her consent. What we have here is a common workflow for publishing information on a company website. However, often these workflows are described in many more words and in language confusing to the reader. Using a diagram will help the reader to understand how the workflow is really going. We are now going to make a diagram that clearly shows the workflow described in the previous section. Step 1: Start with a blank canvas If OmniGraffle is already running, you can use the File | New command. If you need to start OmniGraffle you may either have a new blank document at your disposal, or you may be presented with the Template Chooser. The template chooser contains a few ready-made templates for various tasks. For this task, choose the Blank template and hit the New Diagram button. Step 2: Add the first task The first task for a website author is of course to start a new article. We'll use an oblong to denote this. In the tool-selector, you click on the Shape Tool. You will notice a blue circle with the number 1 inside. This indicates that this tool has been selected to perform once. This means that after you have used the tool once, OmniGraffle will revert back to the selection tool. If you want to draw more than one particular shape, double-click on the corresponding icon, and it will not change until you select another tool to use. Now, draw an oblong shape on the canvas. Notice that the blue circle over the shape tool is gone—and the selection tool has been automatically selected. Double-click inside the oblong shape. You will now have the ability to put text inside the shape. Type in Start new article. If your version of the oblong and the text does not exactly look like what you see in the article, this is not important right now. We are going to fix this later. Do not spend time trying to get your oblong looking 100% like what you see here. When you are done press the Esc key (or click anywhere on the canvas, outside of the shape). You will now notice that the shape is selected since the shape has got eight "handles": Just leave it like this. The handles you see on the shape are what you use when you want to resize the shape using your mouse. Step 3: Add task—writing article The next task is of course to write the actual article. With the Start new article box selected, press the +D keyboard shortcut combination to duplicate the shape. You should now have one box on top of the other: Move the selected (copied) oblong to the right of the one underneath. Try to leave a good amount of space between the boxes. You will now have two rectangles with the same content next to each other. Double-click inside the box on the right side to edit the text, and enter Editing article. Step 4: Connecting shapes Since you are in fact documenting a process, using an arrow from one point in the workflow to the next point makes sense. What we want is an arrow going from the Start new article box to the Editing article rectangle. To achieve this, click on the Line Tool in the tool-selector on the canvas toolbar. You will notice a blue circle with the number 1 inside. This indicates that this tool has been selected to perform once. Next, place the cursor over the Start new article oblong. You will notice that the shape is now glowing with a colored hue. The glow is to indicate that you can start (or end) a line on a shape. The color of the glow depends on which version of OmniGraffle you are using. If you are reading the PDF version of this book, you will notice that the glowing color is red. Usage of the red color is also reflected elsewhere in the text. Click once, and move the cursor over to the Editing article oblong. You will notice two things: The Editing article oblong is now glowing; and there is a straight line between the two shapes. When you click on the Editing article oblong, the line becomes permanent. The line is also selected, which is a good thing, as you now will put on an arrow to indicate the direction of the workflow. To add an arrow to a line, you need to use the Lines and Shapes inspector. If the style palette is not shown, press the +1 keyboard combination. The style palette is now visible. Click on the line style and you have access to line properties. As you notice in this inspector, there are several properties you can use to alter the appearance of a line. In fact, you can alter certain properties on all drawn shapes (lines, circles, oblongs, and so on). The important widget for you right now is the following part of the inspector: The left selector controls the appearance of the start of the line. The right selector controls the appearance of the line ending. The middle selector is what kind of line you want to have. Between the two shapes we are now working on, you can leave this selector as it is. Change the right selector to an arrow head: Now you have an arrow between your shapes:
Read more
  • 0
  • 0
  • 3597

article-image-introduction-blender-25-color-grading
Packt
11 Nov 2010
11 min read
Save for later

Introduction to Blender 2.5: Color Grading

Packt
11 Nov 2010
11 min read
Blender 2.5 Lighting and Rendering Bring your 3D world to life with lighting, compositing, and rendering Render spectacular scenes with realistic lighting in any 3D application using interior and exterior lighting techniques Give an amazing look to 3D scenes by applying light rigs and shadow effects Apply color effects to your scene by changing the World and Lamp color values A step-by-step guide with practical examples that help add dimensionality to your scene        I would like to thank a few people who have made this all possible and I wouldn't be inspired doing this now without their great aid: To Francois Tarlier (http://www.francois-tarlier.com) for patiently bearing with my questions, for sharing his thoughts on color grading with Blender, and for simply developing things to make these things existent in Blender. A clear example of this would be the addition of the Color Balance Node in Blender 2.5's Node Compositor (which I couldn't live without). To Matt Ebb (http://mke3.net/) for creating tools to make Blender's Compositor better and for supporting the efforts of making one. And lastly, to Stu Maschwitz (http://www.prolost.com) for his amazing tips and tricks on color grading. Now, for some explanation. Color grading is usually defined as the process of altering and/or enhancing the colors of a motion picture or a still image. Traditionally, this happens by altering the subject photo-chemically (color timing) in a laboratory. But with modern tools and techniques, color grading can now be achieved digitally. Software like Apple's Final Cut Pro, Adobe's After Effects, Red Giant Software’s Magic Bullet Looks, etc. Luckily, the latest version of Blender has support for color grading by using a selection and plethora of nodes that will then process our input accordingly. However, I really want to stress here that often, it doesn't matter what tools you use, it all really depends on how crafty and artistic you are, regardless of whatever features your application has. Normally, color grading could also be related to color correction in some ways, however strictly speaking, color correction deals majorly on a “correctional” aspect (white balancing, temperature changes, etc.) rather than a specific alteration that would otherwise be achieved when applied with color grading. With color grading, we can turn a motion picture or still image into different types of mood and time of the day, we can fake lens filters and distortions, highlight part of an image via bright spotting, remove red eye effects, denoise an image, add glares, and a lot more. With all the things mentioned above, they can be grouped into three major categories, namely: Color Balancing Contrasting Stylization Material Variation Compensation With Color Balancing, we are trying to fix tint errors and colorizations that occurred during hardware post-production, something that would happen when recording the data into, say, a camera's memory right after it has been internally processed. Or sometimes, this could also be applied to fix some white balance errors that were overlooked while shooting or recording. These are, however, non-solid rules that aren't followed all the time. We can, however, use color balancing to simply correct the tones of an image or frame such that the human skin will look more natural with respect to the scene it is located at. Contrasting deals with how subject/s are emphasized with respect to the scene it is located at. It could also refer to vibrance and high dynamic imaging. It could also be just a general method of “popping out” necessary details present in a frame. Stylization refers to effects that are added on top of the original footage/image after applying color correction, balancing, etc. Some examples would be: dreamy effect, day to night conversion, retro effect, sepia, and many more. And last but not the least is Material Variation Compensation. Often, as artists, there will come a point in time that after hours and hours of waiting for your renders to finish, you will realize at the last minute that something is just not right with how the materials are set up. If you're on a tight deadline, rerendering the entire sequence or frame is not an option. Thankfully, but not absolute all the time, we can compensate this by using color grading techniques to specifically tell Blender to adjust just a portion of an image that looks wrong and save us a ton of time if we were to rerender again. However, with the vast topics that Color Grading has, I can only assume that I will only be leading you to the introductory steps to get you started and for you to have a basis for your own experiments. To have a view of what we could possibly discuss, you can check some of the videos I've done here: http://vimeo.com/13262256 http://vimeo.com/13995077 And to those of you interested with some presets, Francois Tarlier has provided some in this page http://code.google.com/p/ft-projects/downloads/list. Outlining some of the aspects that we'll go through in Part 1 of this article, here's a list of the things we will be doing: Loading Image Files in the Compositor Loading Sequence Files in the Compositor Loading Movie Files in the Compositor Contrasting with Color Curves Colorizing with Color Curves Color Correcting with Color Curves And before we start, here are some prerequisites that you should have: Latest Blender 2.5 version (grab one from http://www.graphicall.org or from the latest svn updates) Movies, Footages, Animations (check http://www.stockfootageforfree.com for free stock footages) Still Images Intermediate Blender skill level Initialization With all the prerequisites met and before we get our hands dirty, there are some things we need to do. Fire up Blender 2.5 and you'll notice (by default) that Blender starts with a cool splash screen and with it on the upper right hand portion, you can see the Blender version number and the revision number. As much as possible, you would want to have a similar revision number as what we'll be using here, or better yet, a newer one. This will ensure that tools we'll be using are up to date, bug free, and possibly feature-pumped. Move the mouse over the image to enlarge it. (Blender 2.5 Initial Startup Screen) After we have ensured we have the right version (and revision number) of Blender, it's time to set up our scenes and screens accordingly to match our ideal workflow later on. Before starting any color grading session, make sure you have a clear plan of what you want to achieve and to do with your footages and images. This way you can eliminate the guessing part and save a lot of time in the process. Next step is to make sure we are in the proper screen for doing color grading. You'll see in the menu bar at the top that we are using the “Default” screen. This is useful for general-purpose Blender workflow like Modeling, Lighting, and Shading setup. To harness Blender's intuitive interface, we'll go ahead and change this screen to something more obvious and useful. (Screen Selection Menu) Click the button on the left of the screen selection menu and you'll see a list of screens to choose from. For this purpose, we'll choose “Compositing”. After enabling the screen, you'll notice that Blender's default layout has been changed to something more varied, but not very dramatic. (Choosing the Compositing Screen) The Compositing Screen will enable us to work seamlessly with color grading in that, by default, it has everything we need to start our session. By default, the compositing screen has the Node Editor on top, the UV/Image Editor on the lower left hand side, the 3D View on the lower right hand side. On the far right corner, equaling the same height as these previous three windows, is the Properties Window, and lastly (but not so obvious) is the Timeline Window which is just below the Properties Window as is situated on the far lower right corner of your screen. Since we won't be digging too much on Blender's 3D aspect here, we can go ahead and ignore the lower right view (3D View), or better yet, let's merge the UV/Image Editor to the 3D View such that the UV/Image Editor will encompass mostly the lower half of the screen (as seen below). You could also merge the Properties Window and the Timeline Window such that the only thing present on the far right hand side is the Properties Window. (Merging the Screen Windows) (Merged Screens) (Merged Screens) Under the Node Editor Window, click on and enable Use Nodes. This will tell Blender that we'll be using the node system in conjunction with the settings we'll be enabling later on. (Enabling “Use Nodes”) After clicking on Use Nodes, you'll notice nodes start appearing on the Node Editor Window, namely the Render Layer and Composite nodes. This is one good hint that Blender now recognizes the nodes as part of its rendering process. But that's not enough yet. Looking on the far right window (Properties Window), look for the Shading and Post Processing tabs under Render. If you can't see some parts, just scroll through until you do. (Locating the Shading and Post Processing Tabs) Under the Shading tab, disable all check boxes except for Texture. This will ensure that we won't get any funny output later on. It will also eliminate the error debugging process, if we do encounter some. (Disabling Shading Options) Next, let's proceed to the Post Processing tab and disable Sequencer. Then let's make sure that Compositing is enabled and checked. (Disabling Post Processing Options) Thats it for now, but we'll get back to the Properties Window whenever necessary. Let's move our attention back to the Node Editor Window above. Same keyboard shortcuts apply here compared to the 3D Viewport. To review, here are the shortcuts we might find helpful while working on the Node Editor Window:   Select Node Right Mouse Button Confirm Left Mouse Button Zoom In Mouse Wheel Up/CTRL + Mouse Wheel Drag Zoom Out Mouse Wheel Down/CTRL + Mouse Wheel Drag Pan Screen Middle Mouse Drag Move Node G Box Selection B Delete Node X Make Links F Cut Links CTRL Left Mouse Button Hide Node H Add Node SHIFT A Toggle Full Screen SHIFT SPACE Now, let's select the Render Layer Node and delete it. We won't be needing it now since we're not directly working with Blender's internal render layer system yet, since we'll be solely focusing our attention on uploading images and footages for grading work. Select the Composite Node and move it far right, just to get it out of view for now. (Deleting the Render Layer Node and Moving the Composite Node) Loading image files in the compositor Blender's Node Compositor can upload pretty much any image format you have. Most of the time, you might want only to work with JPG, PNG, TIFF, and EXR file formats. But choose what you prefer, just be aware though of the image format's compression features. For most of my compositing tasks, I commonly use PNG, it being a lossless type of image, meaning, even after processing it a few times, it retains its original quality and doesn't compress which results in odd results, like in a JPG file. However, if you really want to push your compositing project and use data such as z-buffer (depth), etc. you'll be good with EXR, which is one of the best out there, but it creates such huge file sizes depending on the settings you have. Play around and see which one is most comfortable with you. For ease, we'll load up JPG images for now. With the Node Editor Window active, left click somewhere on an empty space on the left side, imagine placing an imaginative cursor there with the left mouse button. This will tell Blender to place here the node we'll be adding. Next, press SHIFT A. This will bring up the add menu. Choose Input then click on Image. (Adding an Image Node) Most often, when you have the Composite Node selected before performing this action, Blender will automatically connect and link the newly added node to the composite node. If not, you can connect the Image Node's image output node to the Composite Node's image input node. (Image Node Connected to Composite Node) To load images into the Compositor, simply click on Open on the the Image Node and this will bring up a menu for you to browse on. Once you've chosen the desired image, you can double left click on the image or single click then click on Open. After that is done, you'll notice the Image Node's and the Composite Node's preview changed accordingly. (Image Loaded in the Compositor) This image is now ready for compositing work.
Read more
  • 0
  • 0
  • 6397
article-image-10-tips-make-great-visual-diagrams-omnigraffle-5
Packt
11 Nov 2010
10 min read
Save for later

10 Tips to make great visual diagrams with OmniGraffle 5

Packt
11 Nov 2010
10 min read
  OmniGraffle 5 Diagramming Essentials Create better diagrams with less effort using OmniGraffle Produce high-quality professional-looking diagrams that communicate information much better than words Makes diagramming fun and simple for Macintosh users Master the art of illustrating your ideas with OmniGraffle Learn to draw engaging charts and graphs to grasp your viewers' attention to your presentations A hands-on guide filled with visual step-by-step examples that cover both the basics and the advanced features of OmniGraffle         Diagramming is really communication. There is a substantial field of study out there, which only deals with the psychology of communication. It is outside the scope of this article to go into the theoretical background on the best way of visually presenting an idea (consider, as an example, some of the works of Edward Tufte). What you will learn in this section are a few handy tips that you may or may not follow. If you decide to follow these tips, your visual diagramming will not go wrong. However, do not follow these tips as "rules". Obey them if they make sense and disobey them when they get in your way. Most importantly, don't lose sight of, or forget what you want to communicate with your diagram. Tip 1: Do some planning before you start OmniGraffle may be the best diagramming tool on the Macintosh. Complex diagrams are still a lot of (hard) work to get right, even with the aid of a computer. OmniGraffle is still just a diagramming tool—it will not do your thinking processes for you. For small and simple diagrams where you have full knowledge of what you want to communicate, you can start working directly in OmniGraffle. However, for bigger and more complex diagrams, it may be easier to start your thought process using a white board, or some paper and a pencil. If you still insist on using a computer for organizing your thought processes, you should take a look at OmniOutliner from the same people that make OmniGraffle. The cool thing about using OmniOutliner is that you can import your outliner documents into OmniGraffle and then OmniGraffle will create a diagram for you. If outlining is too simple, and you are more used to mind mapping—there are some simple mind mapping stencils at Graffletopia. However, you may be better off using a specialty tool like MindManager from MindJet Corporation (http://www.mindjet.com/). A very good example of planning ahead is traffic signs. Designing traffic signs takes into account the driver's needs and requirements (that is, easy to understand pictograms going by in 120 km/h on the highway). These signs may seem simple to create – but a lot of work has been put into them to make them this simple. Even if you have not seen a given sign before, there is a good chance that you will understand it's meaning without further explanation. A good diagram should be like a well designed traffic sign. Tip 2: Colorize gently The old adage that "less is more" really applies to diagramming at large. Use light colors whenever possible when filling shapes. Try not to mix strong and light colors on the same diagram. If want to use text in colored shapes – take into account the contrast of the background color and the text. Light colors should have black text, and strong colors should have white text. Stick to either black or white text. Use as few colors as possible – never use yet-another-color just because you can. If you need ideas on which colors may match each other you should investigate the software tools found on the ColorJack website (http://www.colorjack.com/). The ColorSphere and the swatches are a good starting point. Another interesting website to get some ideas on good color combinations is the Kuler community. In this community users are both sharing their own color swatches, and can vote on the best-looking color swatches in the community. You find Kuler community at http://kuler.adobe.com/. If you need to use colored text on a colored background – and really care about the readability (contrast) of your message (which you should), then you should try the Colour Contrast Check tool from snook.ca —go to http://www.snook.ca/technical/colour_contrast/colour.html and experiment with foreground and background colors. Tip 3: Use few fonts The rule of thumb to use on any publication with regards to font use: Never use more than two fonts. Unless for the title of your diagram, avoid using serif fonts. Serif fonts have small details on the end of each stroke making up a letter. A very good example of a serif font is Times Roman. The text you are reading right now is set in a serif font. The various headings found throughout this book are without serifs. These fonts without serifs are also known as sans serif fonts. Good diagramming fonts are Helvetica, Futura, Optima, and Lucida Grande. All these fonts are sans serif fonts, and readily available from the Fonts stencil found in the Common stencil directory. This said, if your main document is not using any of these fonts—try to match your diagram fonts with your main document. Though one of the "rules of thumb" regarding fonts and types is not to use ALL CAPS, there may be times when it is appropriate for your diagram. The same also is true regarding starting a word with an upper case letter. It may look better to start a word using lower case. Tip 4: Consider your output media If your diagram is going to appear in a printed report, thin lines may be better than thicker lines. If your diagram is going to appear on a wall poster—thicker lines will probably be better than thinner lines as the reader is reading the poster from a distance. If your diagram is going to appear only on screen, thicker lines may be better than thinner lines, but try not to go beyond 2 points thickness. A thin line is a 1 point thick line—a thicker line is 2 points or more. Tip 5: Symmetry is better than asymmetry By nature, our brains tend to seek symmetry. Symmetry helps your diagram look balanced. Balance makes your diagram look more professional. There is a caveat regarding visual symmetry: Visual symmetry does not equal mathematical symmetry. A good example of mathematical symmetry is the income diagram shown below. The cylinders below the blue arrows are mathematically correct but if you study the diagram you might get a nagging feeling that there is something not quite right. However, you cannot really put your finger on what the problem is. This is probably due to the lack of visual symmetry. One solution is given below where the expenditures are alone shown in cylinders. The saving is shown as a piggy bank using a stencil called Cash Flow from Graffletopia. Any educated graphics designer (architect, photographer, illustrator, and so on) will tell you that you should favor visual symmetry rather than mathematical. If you are unsure about how to do this—just create diagrams that "feel and look right". If this fails, go down the mathematical symmetry route. Tip 6: Have one, and only one, focus point The focus point is the most important part of your diagram. Creating diagrams means that you will have several elements in your diagram. If you are not careful, your readers will not "get" your diagram without spending a lot of time studying the details. It is really important to have as few focus points as possible. If you can get away with only one focus point – this is excellent. If your number of focus points increases beyond five, your diagram runs the risk of becoming everything and the kitchen sink – as such, you should really go back to your planning stage! If your diagram is conveying more than one message, try to make more than one diagram. Even if your audience is versed in the subject it will often pay to either divide the diagram – or create separate ones. Tip 7: Apply the Golden Ratio to stand alone diagrams If your diagram is not part of an accompanying and explanatory text, you should apply the so-called Golden Ratio. Another name for the Golden Ratio, is the Rule of Thirds. In practise you divide your page into thirds, both horizontally and vertically. You will now have a grid of nine boxes. However, it's where the horizontal and vertical lines cross each other that you should concentrate. This is the part of your diagram where you should place the most important elements. Tip 8: Use titles, figure captions, and legends Stand-alone diagrams must always have a title telling the reader what the diagram is about. If your diagram is part of a book or a report, you may want to include figure captions – at least if you reference your diagram at more than one place in the text. Instead of addressing the diagrams as "In the second diagram from the bottom on page 34, we see that ..." – put a figure caption below the diagram, and you can now address the diagram in the text as "In fig. 12, we see that ...". If your diagram contains elements that may not be intuitive for the reader, then add a legend to your drawing. If the lines between elements have different colors—then you absolutely need a legend to explain the difference between the red and the green lines. It may be an excellent idea to place the legend inside a box a bit away from the diagram with a readable heading stating: Diagram legend. Tip 9: Be liberal with white space Use space around your elements. Do not cramp them together, as this will make your diagram look messy and dirty. It's better to use a whole extra page in landscape mode in a report for an important diagram, rather to compress the diagram to fit within the text. In the planning stage of your diagram, take white space into account – and you may end up with a different layout that is more fitting for your report than your original plan. A lot of times your diagram will end up in a report or on a web page. Most of these places adhere to portrait-based layouts. It may be a good thing trying to make your diagram fit a portrait-based layout – rather than sticking to using landscape out of habit. Tip 10: Be consistent Never use two different shapes for the same kind of element. Never use two different colors on shapes or lines to convey the same meaning. Never use different fonts, and font sizes, within the same types of shapes. Let's say you need to have a diagram involving animals in the general sense. If you can't find a drawing or a picture of a group of animals – use the same animal concisely. Also, use a shape/picture/drawing (animal) that people recognize.   Further resources on this subject: OmniGraffle 5: Making your Diagram Look Good OmniGraffle 5: Shape Selection, Re-Styling and Color Picker in Detail
Read more
  • 0
  • 0
  • 8540

article-image-q-subscription-maintenance-ibm-infosphere
Packt
11 Nov 2010
12 min read
Save for later

Q Subscription Maintenance in IBM Infosphere

Packt
11 Nov 2010
12 min read
  IBM InfoSphere Replication Server and Data Event Publisher Design, implement, and monitor a successful Q replication and Event Publishing project Covers the toolsets needed to implement a successful Q replication project Aimed at the Linux, Unix, and Windows operating systems, with many concepts common to z/OS as well A chapter dedicated exclusively to WebSphere MQ for the DB2 DBA Detailed step-by-step instructions for 13 Q replication scenarios with troubleshooting and monitoring tips Written in a conversational and easy to follow manner Checking the state of a Q subscription The state of a Q subscription is recorded in the IBMQREP_SUBS table, and can be queried as follows: db2 "SELECT SUBSTR(subname,1,10) AS subname, state FROM asn.ibmqrep_subs" SUBNAME STATE -------- ----- DEPT0001 A XEMP0001 A Stopping a Q subscription The command to stop a Q subscription is STOP QSUB SUBNAME <qsubname>. Note that if Q Capture is not running, then the command will not take effect until Q Capture is started, because the STOP QSUB command generates an INSERT command into the IBMQREP_SIGNAL table: INSERT INTO ASN.IBMQREP_SIGNAL (signal_type, signal_subtype, signal_input_in) VALUES ('CMD', 'CAPSTOP', 'T10001'); In a unidirectional setup, to stop a Q subscription called T10001 where the Q Capture and Q Apply control tables have a schema of ASN, create a text file called SYSA_qsub_stop_uni.asnclp containing the following ASNCLP commands: ASNCLP SESSION SET TO Q REPLICATION; SET RUN SCRIPT NOW STOP ON SQL ERROR ON; SET SERVER CAPTURE TO DB DB2A; SET SERVER TARGET TO DB DB2B; SET CAPTURE SCHEMA SOURCE ASN; SET APPLY SCHEMA ASN; stop qsub subname T10001; In bidirectional or peer-to-peer two-way replication, we have to specify both Q subscriptions (T10001 and T10002) for the subscription group: ASNCLP SESSION SET TO Q REPLICATION; SET RUN SCRIPT NOW STOP ON SQL ERROR ON; SET CAPTURE SCHEMA SOURCE ASN; SET APPLY SCHEMA ASN; SET SERVER CAPTURE TO DB DB2A; SET SERVER TARGET TO DB DB2B; stop qsub subname T10001; SET SERVER CAPTURE TO DB DB2B; SET SERVER TARGET TO DB DB2A; stop qsub subname T10002; In a Peer-to-peer four-way setup, the commands would be in a file called qsub_stop_p2p4w.asnclp containing the following ASNCLP commands: ASNCLP SESSION SET TO Q REPLICATION; SET RUN SCRIPT NOW STOP ON SQL ERROR ON; SET CAPTURE SCHEMA SOURCE ASN; SET APPLY SCHEMA ASN; SET SERVER CAPTURE TO DB DB2A; SET SERVER TARGET TO DB DB2B; stop qsub subname T10001; SET SERVER CAPTURE TO DB DB2A; SET SERVER TARGET TO DB DB2C; stop qsub subname T10002; SET SERVER CAPTURE TO DB DB2A; SET SERVER TARGET TO DB DB2D; stop qsub subname T10003; Dropping a Q subscription The ASNCLP command to drop a Q subscription is: DROP QSUB (SUBNAME <qsubname> USING REPLQMAP <repqmapname>); In a unidirectional setup, to drop a Q subscription called T10001, which uses a Replication Queue Map called RQMA2B, create a file called drop_qsub_uni.asnclp containing the following ASNCLP commands: ASNCLP SESSION SET TO Q REPLICATION; SET RUN SCRIPT NOW STOP ON SQL ERROR ON; SET SERVER CAPTURE TO DB DB2A; SET SERVER TARGET TO DB DB2B; SET CAPTURE SCHEMA SOURCE ASN; SET APPLY SCHEMA ASN; drop qsub (subname TAB1 using replqmap RQMA2B); We can use the SET DROP command to specify whether for unidirectional replication the target table and its table space are dropped when a Q subscription is deleted: SET DROP TARGET [NEVER|ALWAYS] The default is not to drop the target table. In a multi-directional setup, there are three methods we can use: In the first method, we need to issue the DROP QSUB command twice, once for the Q subscription from DB2A to DB2B and once for the Q subscription from DB2B to DB2A. In this method, we need to know the Q subscription and Replication Queue Map names, which is shown in the qsub_drop_bidi0.asnclp file: ASNCLP SESSION SET TO Q REPLICATION; SET RUN SCRIPT NOW STOP ON SQL ERROR ON; SET CAPTURE SCHEMA SOURCE ASN; SET APPLY SCHEMA ASN; SET SERVER CAPTURE TO DB DB2A; SET SERVER TARGET TO DB DB2B; drop qsub (subname T10001 using replqmap RQMA2B); SET SERVER CAPTURE TO DB DB2B; SET SERVER TARGET TO DB DB2A; drop qsub (subname T10002 using replqmap RQMB2A); In the second method, we use the DROP SUBTYPE command, which is used to delete the multi-directional Q subscriptions for a single logical table. We use the DROP SUBTYPE command with the SET REFERENCE TABLE construct, which identifies a Q subscription for multi-directional replication. An example of using these two is shown in the following content file, which drops all the Q subscriptions for the source table eric.t1. This content file needs to be called from a load script file. SET SUBGROUP "TABT1"; SET SERVER MULTIDIR TO DB "DB2A"; SET SERVER MULTIDIR TO DB "DB2B"; SET REFERENCE TABLE USING SCHEMA "DB2A".ASN USES TABLE eric.t1; DROP SUBTYPE B QSUBS; The USING SCHEMA part of the SET REFERENCE TABLE command identifies the server that contains the table (DB2A) and the schema (ASN) of the control tables in which this table is specified as a source and target. The USES TABLE part specifies the table schema (eric) and table name (t1) to which the Q subscription applies. When we use this command, no tables or table spaces are ever dropped. The SUBGROUP name must be the valid for the tables whose Q subscriptions we want to drop. We can find the SUBGROUP name for a table using the following query: db2 "SELECT SUBSTR(subgroup,1,10) AS subsgroup, SUBSTR(source_ owner,1,10) as schema, SUBSTR(source_name,1,10) as name FROM asn. ibmqrep_subs" SUBSGROUP SCHEMA NAME ------ ------- ------ TABT2 DB2ADMIN DEPT TABT2 DB2ADMIN XEMP The preceding ASNCLP command generates the following SQL: -- CONNECT TO DB2B USER XXXX using XXXX; DELETE FROM ASN.IBMQREP_TRG_COLS WHERE subname = 'T10001' AND recvq = 'CAPA.TO.APPB.RECVQ'; DELETE FROM ASN.IBMQREP_TARGETS WHERE subname = 'T10001' AND recvq = 'CAPA.TO.APPB.RECVQ'; DELETE FROM ASN.IBMQREP_SRC_COLS WHERE subname = 'T10002'; DELETE FROM ASN.IBMQREP_SUBS WHERE subname = 'T10002'; -- CONNECT TO DB2A USER XXXX using XXXX; DELETE FROM ASN.IBMQREP_SRC_COLS WHERE subname = 'T10001'; DELETE FROM ASN.IBMQREP_SUBS WHERE subname = 'T10001'; DELETE FROM ASN.IBMQREP_TRG_COLS WHERE subname = 'T10002' AND recvq = 'CAPB.TO.APPA.RECVQ'; DELETE FROM ASN.IBMQREP_TARGETS WHERE subname = 'T10002' AND recvq = 'CAPB.TO.APPA.RECVQ'; A third method uses the DROP SUBGROUP command, as shown: SET SUBGROUP "TABT2"; SET SERVER MULTIDIR TO DB "DB2A"; SET SERVER MULTIDIR TO DB "DB2B"; SET MULTIDIR SCHEMA "DB2A".ASN ; DROP SUBGROUP; With this command, we just need to specify the Q subscription group name (SUBGROUP). The preceding ASNCLP command generates the following SQL: -- CONNECT TO DB2A USER XXXX using XXXX; DELETE FROM ASN.IBMQREP_TRG_COLS WHERE subname = 'T10002' AND recvq = 'CAPB.TO.APPA.RECVQ'; DELETE FROM ASN.IBMQREP_TARGETS WHERE subname = 'T10002' AND recvq = 'CAPB.TO.APPA.RECVQ'; DELETE FROM ASN.IBMQREP_SRC_COLS WHERE subname = 'T10001'; DELETE FROM ASN.IBMQREP_SUBS WHERE subname = 'T10001'; -- CONNECT TO DB2B USER XXXX using XXXX; DELETE FROM ASN.IBMQREP_SRC_COLS WHERE subname = 'T10002'; DELETE FROM ASN.IBMQREP_SUBS WHERE subname = 'T10002'; DELETE FROM ASN.IBMQREP_TRG_COLS WHERE subname = 'T10001' AND recvq = 'CAPA.TO.APPB.RECVQ'; DELETE FROM ASN.IBMQREP_TARGETS WHERE subname = 'T10001' AND recvq = 'CAPA.TO.APPB.RECVQ'; In a peer-to-peer three-way scenario, we would add a third SET SERVER MULTIDIR TO DB line pointing to the third server. If we use the second or third method, then we do not need to know the Q subscription names, just the table name in the second method and the Q subscription group name in the third method. Altering a Q subscription We can only alter Q subscriptions which are inactive. The following query shows the state of all Q subscriptions: db2 "SELECT SUBSTR(subname,1,10) AS subname, state FROM asn.ibmqrep_subs" SUBNAME STATE ---------- ----- DEPT0001 I At the time of writing, if we try and alter an active Q subscription, we will get the following error when we run the ASNCLP commands: ErrorReport : ASN2003I The action "Alter Subscription" started at "Friday, 22 January 2010 12:53:16 o'clock GMT". Q subscription name: "DEPT0001". Q Capture server: "DB2A". Q Capture schema: "ASN". Q Apply server: "DB2B". Q Apply schema: "ASN". The source table is "DB2ADMIN.DEPT". The target table or stored procedure is "DB2ADMIN.DEPT". ASN0999E "The attribute "erroraction" cannot be updated." : "The Subscription cannot be updated because it is in active state" : Error condition "*", error code(s): "*", "*", "*". This should be resolved in a future release. So now let's move on and look at the command to alter a Q subscription. To alter a Q subscription, we use the ALTER QSUB ASNCLP command. The parameters for the command depend on whether we are running unidirectional or multi-directional replication. We can change attributes for both the source and target tables, but what we can change depends on the type of replication (unidirectional, bidirectional, or peer-to-peer), as shown in the following table: ParameterUniBiP2PSource table:ALL CHANGED ROWS [N | Y]YY HAS LOAD PHASE [N | I |E]YYYTarget table:CONFLICT RULE [K | C | A] Y CONFLICT ACTION [I | F | D | S | Q] Y ERROR ACTION [Q | D | S]YYYLOAD TYPE [0 | 2 | 3 | 4 | 104 | 5 | 105]YYYOKSQLSTATES ["sqlstates"]YYY For unidirectional replication, the format of the command is: ALTER QSUB <subname> REPLQMAP <mapname> USING REPLQMAP <mapname> DESC <description> MANAGE TARGET CCD [CREATE SQL REGISTRATION|DROP SQL REGISTRATION|ALTER SQL REGISTRATION FOR Q REPLICATION] USING OPTIONS [other-opt-clause|add-cols-clause] other-opt-clause: SEARCH CONDITION "<search_condition>" ALL CHANGED ROWS [N|Y] HAS LOAD PHASE-- [N|I|E] SUPPRESS DELETES [N|Y] CONFLICT ACTION [I|F|D|S|Q] ERROR ACTION [S|D|Q] OKSQLSTATES "<sqlstates>" LOAD TYPE [0|1|2|3|4|104|5|105] add-cols-clause: ADD COLS (<trgcolname1> <srccolname1>,<trgcolname2> <srccolname2>) An example of altering a Q subscription to add a search condition is: ASNCLP SESSION SET TO Q REPLICATION; SET RUN SCRIPT NOW STOP ON SQL ERROR ON; SET CAPTURE SCHEMA SOURCE ASN; SET APPLY SCHEMA ASN; SET SERVER CAPTURE TO DB DB2A; SET SERVER TARGET TO DB DB2B; ALTER QSUB tab1 REPLQMAP rqma2b USING OPTIONS SEARCH CONDITION "WHERE :c1 > 1000" ; In multi-directional replication, the format of the command is: ALTER QSUB SUBTYPE B FROM NODE <svn.schema> SOURCE [src-clause] TARGET [trg-clause] FROM NODE <svn.schema> SOURCE [src-clause] TARGET [trg-clause] src-clause: ALL CHANGED ROWS [N/Y] HAS LOAD PHASE [N/I/E] trg-clause: CONFLICT RULE [K/C/A] +-' '-CONFLICT ACTION [I/F/D/S/Q] ERROR ACTION [Q/D/S] LOAD TYPE [0/2/3] OKSQLSTATES <"sqlstates"> If we are altering a Q subscription in a multi-directional environment, then we can use the SET REFERENCE TABLE construct. We need to specify the SUBTYPE parameter as follows: Bidirectional replication: ALTER QSUB SUBTYPE B Peer-to-peer replication: ALTER QSUB SUBTYPE P Let's look at a bidirectional replication example, where we want to change the ERROR ACTION to D for a Q subscription where the source table name is db2admin.dept. The content file (SYSA_cont_alter02.txt) will contain: SET SUBGROUP "TABT2"; SET SERVER MULTIDIR TO DB "DB2A"; SET SERVER MULTIDIR TO DB "DB2B"; SET REFERENCE TABLE USING SCHEMA "DB2A".ASN USES TABLE db2admin.dept; ALTER QSUB SUBTYPE B FROM NODE DB2A.ASN SOURCE TARGET ERROR ACTION D FROM NODE DB2B.ASN SOURCE TARGET ERROR ACTION D; We have to specify the SOURCE keyword even though we are only changing the target attributes. The ALTER QSUB statement spans the three last lines of the file. Starting a Q subscription An example of the ASNCLP command START QSUB to start a Q subscription can be found in the SYSA_qsub_start_db2ac.asnclp file. We just have to plug in the Q subscription name (T10002 in our example). ASNCLP SESSION SET TO Q REPLICATION; SET RUN SCRIPT NOW STOP ON SQL ERROR ON; SET CAPTURE SCHEMA SOURCE ASN; SET APPLY SCHEMA ASN; SET SERVER CAPTURE TO DB DB2A; SET SERVER TARGET TO DB DB2C; START QSUB SUBNAME T10002; Run the file as: asnclp -f SYSA_qsub_start_db2ac.asnclp We cannot put two START QSUB statements in the same file (as shown), even if they have their own section. So, we cannot code: ASNCLP SESSION SET TO Q REPLICATION; SET RUN SCRIPT NOW STOP ON SQL ERROR ON; SET SERVER CAPTURE TO DB DB2A; SET SERVER TARGET TO DB DB2D; SET CAPTURE SCHEMA SOURCE ASN; SET APPLY SCHEMA ASN; START QSUB SUBNAME T10003; SET SERVER CAPTURE TO DB DB2A; SET SERVER TARGET TO DB DB2C; START QSUB SUBNAME T10002; Sending a signal using ASNCLP For signals such as CAPSTART, CAPSTOP, and LOADDONE to be picked up, Q Capture needs to be running. Note that Q Capture does not have to be up for the signals to be issued, just picked up. As they are written to the DB2 log, Q Capture will see them when it reads the log and will action them in the order they were received. Summary In this article we took a look at how we can stop or drop or alter a Q subscription using ASNCLP commands and how we can issue a CAPSTART command. Further resources on this subject: Lotus Notes Domino 8: Upgrader's Guide [Book] Q Replication Components in IBM Replication Server [Article] IBM WebSphere MQ commands [Article] WebSphere MQ Sample Programs [Article] MQ Listener, Channel and Queue Management [Article]
Read more
  • 0
  • 0
  • 2962
Modal Close icon
Modal Close icon