<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"xmlns:content="http://purl.org/rss/1.0/modules/content/"xmlns:wfw="http://wellformedweb.org/CommentAPI/"xmlns:dc="http://purl.org/dc/elements/1.1/"xmlns:atom="http://www.w3.org/2005/Atom"xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BearSols</title><atom:link href="http://web.bearsols.com/feed" rel="self" type="application/rss+xml" /><link>http://web.bearsols.com</link><description></description><lastBuildDate>Fri, 08 Oct 2010 09:22:04 +0000</lastBuildDate><language>en</language><sy:updatePeriod>hourly</sy:updatePeriod><sy:updateFrequency>1</sy:updateFrequency><item><title>Loose Coupling in a Service-Oriented Architecture (By: O&#8217;Reilly Media)</title><link>http://web.bearsols.com/development-design/web-services/loose-coupling-in-a-service-oriented-architecture-by-oreilly-media</link><comments>http://web.bearsols.com/development-design/web-services/loose-coupling-in-a-service-oriented-architecture-by-oreilly-media#comments</comments><pubDate>Fri, 08 Oct 2010 09:22:04 +0000</pubDate><dc:creator>anhnl</dc:creator><category><![CDATA[Web Services]]></category><guid isPermaLink="false">http://web.bearsols.com/?p=3410</guid><description><![CDATA[Loose Coupling in a Service-Oriented ArchitectureIf you&#8217;re looking for an introduction to one of the key concepts behind building a service-oriented architecture (SOA), you&#8217;ve come to the right place. This two-part article explains why loose coupling is important to SOA, the forms of loose coupling, and how to deal with it. It is excerpted from [...]]]></description><content:encoded><![CDATA[<p><span style="color: #800000;"><strong>Loose Coupling in a Service-Oriented Architecture</strong></span></p><p>If you&#8217;re looking for an introduction to one of the key concepts behind building a service-oriented architecture (SOA), you&#8217;ve come to the right place. This two-part article explains why loose coupling is important to SOA, the forms of loose coupling, and how to deal with it. It is excerpted from chapter four of the book SOA in Practice: The Art of Distributed System Design, written by Nicolai Josuttis (O&#8217;Reilly, 2008; ISBN: 0596529554). Copyright © 2008 O&#8217;Reilly Media, Inc. All rights reserved. Used with permission from the publisher. Available from booksellers or direct from O&#8217;Reilly Media.</p><p>SOA applies to large distributed systems. Scalability and fault tolerance are key to the maintainability of such systems. Another important goal is to minimize the impact of modifications and failures on the system landscape as a whole. Thus, loose coupling is a key concept of SOA.</p><p>This chapter will discuss the motivations for this concept (for large distributed systems), exploring variations of loose coupling from the technical and organizational points of view. This topic will demonstrate that SOA is a paradigm that leads to special priorities when designing large systems. However, again, there is no rule prescribing which kind or level of loose coupling you should employ. This decision must be made based on your specific circumstances.<br />4.1  The Need for Fault Tolerance</p><p>We live in crazy times. The market rules, which means you won’t usually have enough time to create well-elaborated, robust system designs. If you’re not fast enough, flexible enough, and cheap enough, you’ll soon find yourself out of the market. Thus, you need fast, flexible, and cheap solutions.</p><p>Fast and cheap solutions, however, can’t be well designed and robust. Consequently, you will have to deal with errors and problems. The important point here is fault tolerance. The most important thing is that your systems run. According to [ITSecCity02] , a flight-booking system failure may cost $100,000 an hour, a credit card system breakdown may cost $300,000 an hour, and a stock-trading malfunction may cost $8 million an hour. As these figures show, fault tolerance is key for large distributed systems. When problems occur, it is important to minimize their effects and consequences.<br />4.2  Forms of Loose Coupling</p><p>Loose coupling is the concept typically employed to deal with the requirements of scalability, flexibility, and fault tolerance. The aim of loose coupling is to minimize dependencies. When there are fewer dependencies, modifications to or faults in one system will have fewer consequences on other systems.</p><p>Loose coupling is a principle; it is neither a tool, nor a checklist. When you design your SOA, it is up to you to define which kinds and amount of loose coupling you introduce. However, there are some typical topics you might want to consider when you think about loose coupling in your system. Table 4-1 lists them (this list is an extension of a list published in [KrafzigBankeSlama04], p. 47).</p><p>TABLE 4-1 . Possible forms of loose coupling in SOA<br />Tight coupling     Loose coupling<br />Physical connections     Point-to-point     Via mediator<br />Communication style     Synchronous     Asynchronous<br />Data model     Common complex types     Simple common types only<br />Type system     Strong     Weak<br />Interaction pattern     Navigate through complex object trees     Data-centric, self-contained message<br />Control of process logic     Central control     Distributed control<br />Binding     Statically     Dynamically<br />Platform     Strong platform dependencies     Platform independent<br />Transactionality     2PC (two-phase commit)     Compensation<br />Deployment     Simultaneous     At different times<br />Versioning     Explicit upgrades     Implicit upgrades</p><p>This table is far from being complete, but it’s pretty typical for large distributed systems. Note again that this is not a checklist. There is no SOA certification saying you conform when all or at least 50 percent of the forms of loose coupling are in use. However, it would be very strange if none of these forms of loose coupling were used in your SOA. If this were possible, your system would appear not to have the common requirements of large distributed systems with different owners. That’s OK, but you shouldn’t call your solution SOA. (Well, it may help you get money and resources for it, but beware of false impressions.)</p><p>If there is such a fine list of aspects of loose coupling, and minimizing dependencies is good, you might be wondering why you don’t simply use all these forms of loose coupling in each SOA. The answer is that there is a price to pay for loose coupling, in that it makes systems more complex. That means more development, and/or maintenance effort.</p><p>To explore how the forms of loose coupling listed in Table 4-1 can help and the costs they can incur, let’s examine some more closely. Most of these topics will be discussed in more detail later in the book, so I’ve included references to future chapters where appropriate.</p><p><span style="color: #800000;"><strong>Loose Coupling in a Service-Oriented Architecture &#8211; 4.2.1 Asynchronous Communication</strong></span></p><p>Probably the most well-known  example of loose coupling is asynchronous communication (see Figure  4-1). Asynchronous communication usually means that the sender of a  message and its receiver are not synchronized. Think of it like sending  an email. After you send a message, you can continue your work while  waiting for an answer. The recipient might not be available (online)  when you send the message. When she comes online, the message gets  delivered, and she can process it and send a response if necessary  (again, with no requirement that you be available/online when she sends  it).</p><p><img src="http://images.devshed.com/da/stories/Loose_Coupling/image_1.JPG" alt="" width="382" height="170" /><br /><strong>Figure 4-1.</strong> <em> Decoupling by asynchronous communication </em></p><p><strong> </strong></p><p>One  problem with asynchronous communication occurs when the sender needs a  reply. With asynchronous communication, you don’t get replies to your  messages immediately. Because you don’t know when (or whether) a reply  will arrive, you continue your work and start to perform different  tasks. Then, when the response arrives, you have to deal with it in an  appropriate way. This means that you have to associate the answer with  the original request (e.g., by processing something like a “correlation  ID”). In addition, you have to process the reply, which usually requires  knowledge of some of the initial state and context when the request was  sent. Both correlating the response to the request, and transferring  the state from the request to the response, require some effort. <strong> </strong></p><blockquote dir="ltr"><p><strong>NOTE </strong></p><p>See <a>Chapter <span>10</span></a> for a discussion of different message exchange patterns (MEPs) and Section <a><span>15.3.3</span></a> for details about correlation IDs.</p></blockquote><p>The  situation gets worse when you send a lot of asynchronous messages. The  order in which you receive responses might be different from the order  in which you sent the messages, and some of the awaited responses might  not arrive (or arrive in time). Programming, testing, and debugging all  the possible eventualities can be very complicated and time consuming.</p><p>For  this reason, one of my customers who has hundreds of services in  production has the policy of avoiding asynchronicity whenever a request  needs a reply. Having found that debugging race conditions (situations  caused by different unexpected response times) was a nightmare, and  knowing that maintainability was key in large distributed systems, the  customer decided to minimize the risk of getting into these situations.  This decision involved a tradeoff because performance was not as good as  it might have been with more asynchronous communication.</p><p>As  this discussion demonstrates, there are two sides to introducing  asynchronous communication in SOA (or distributed systems in general):</p><ol type="disc"><li>The  advantage is that the systems exchanging service messages do not have  to be online at the same time. In addition, if a reply is required, long  answering times don’t block the service consumer.</li><li>The drawback is that the logic of the service consumer gets (much) more complicated.</li></ol><p>Note  that when discussing asynchronicity, people do not always mean the same  thing. For example, asynchronous communication from a consumer’s point  of view might mean that the consumer doesn’t block to wait for an  answer, while from an infrastructure’s (ESB’s) point of view, it might  mean that a message queue is used to decouple the consumer and provider.  Often, both concepts apply in practice, but this is not always the  case.</p><p><span style="color: #800000;"><strong>Loose Coupling in a Service-Oriented Architecture &#8211; 4.2.2 Heterogeneous Data Types</strong></span></p><p>Now, let’s discuss my favorite example of loose coupling: the harmonization of data types over distributed systems. This topic always leads to much discussion, and understanding it is key to understanding large systems.</p><p>There is no doubt that life is a lot easier if data types are shared across all systems. For this reason, harmonizing data types is a “natural” approach. In fact, when object-orientation became mainstream, having a common business object model (BOM) became a general goal. But, it turned out that this approach was a recipe for disaster for large systems.</p><p>“WHAT A SHAME THAT WE CAN’T HARMONIZE ANYMORE”</p><p>A while ago, I gave a talk about SOA that included my usual claim that you have to accept that you can’t harmonize data types on large systems. A senior systems architect came to me during the coffee break and said, “Isn’t it sad how bad things have become in our industry when we even can’t harmonize data types anymore? In the past we were able to analyze and design our systems.” It sounded like a criticism of the younger generations of software developers, who are able to do only one thing: copy and paste.</p><p>My answer was as follows: “You might be right. In our crazy times, we simply do not have enough time for careful and long analysis and design. The marketing guys rule the world, and if we don’t deliver in time, we are out of the market (even if we have better quality). But be careful, and don’t underestimate the level of complexity we have reached now by connecting systems. Remember, there is no central control any longer, and if there were it wouldn’t work. If we had harmonized an address type before we shipped the Internet protocols, the Internet would never have become reality. Large-scale systems need the minimal consensus you can provide to be successful. Note that you still can harmonize data types when things run.”</p><p>The first reason for the disaster was an organizational one: it was simply not possible to come to an agreement for harmonized types. The views and interests of the different systems were too varied. Because large distributed systems typically have different owners, it was tough to reach agreements. Either you didn’t fulfill all interests, or your model became far too complicated, or it simply was never finished. This is a perfect example of “analysis paralysis”: if you try to achieve perfection when analyzing all requirements, you’ll never finish the job.</p><p>You might claim that the solution is to introduce a central role (a systems architect or a “model master”) that resolves all open questions, so that one common BOM with harmonized data types becomes a reality. But then, you’ll run into another fundamental problem: different systems enhance differently. Say you create a harmonized data type for customers. Later, a billing system might need two new customer attributes to deal with different tax rates, while a CRM system might introduce new forms of electronic addresses, and an offering system might need attributes to deal with privacy protection. If a customer data type is shared among all your systems (including systems not interested in any of these extensions), all the systems will have to be updated accordingly to reflect each change, and the customer data type will become more and more complicated.</p><p>Sooner or later, the price of harmonization becomes too high. Keeping all the systems in sync is simply too expensive in terms of time and money. And even if you manage to succeed, your next company merger will introduce heterogeneity again!</p><p>Common BOMs do not scale because  they lead to a coupling of systems that is too tight. As a consequence,  you have to accept the fact that data types on large distributed  systems will not be harmonized. In decoupled large systems, data types  differ (see Figure 4-2).</p><p><img src="http://images.devshed.com/da/stories/Loose_Coupling/image_2.JPG" alt="" width="367" height="120" /><br /><strong>Figure 4-2.</strong> <em> Decoupling by using different data types</em></p><p>Again, there is a price to pay for this decision: if data types are not harmonized, you need <em>data type mappings </em>(which  include technical and semantic aspects). Although mapping adds  complexity, it is a good sign in large systems because it demonstrates  that components are decoupled.</p><p>The usual approach is  that a service provider defines the data types used by the services it  provides (which might be ruled by some general conventions and  constraints). The service consumers have to accept these types. Note  that a service consumer should avoid using the provider’s data types in  its own source code. Instead, a consumer should have a thin <em>mapping layer </em><a>to map the provider’s data types to its own data types. See Section 12.3.1 for </a>a detailed explanation of why this is important.</p><p>Again,  there are two sides to introducing this form of loose coupling in SOA  (or distributed systems in general). Having no common business data  model has pros and cons:</p><ol type="disc"><li>The advantage is that  systems can modify their data types without directly affecting other  systems (modified service interfaces affect only corresponding  consumers).</li><li>The drawback is that you have to map data types from one system to another.</li></ol><p>Note  that you will need some fundamental data types to be shared between all  applications. But to promote loose coupling, fundamental data types  harmonized for all services should usually be very basic. The most  complicated common data type I’ve seen a phone company introduce in a  SOA landscape was a data type for a phone number (a structure/record of  country code, area code, and local number). The trial to harmonize a  common type for addresses (customer addresses, invoice addresses, etc.)  failed. One reason was an inability to agree on how to deal with titles  of nobility. Another reason was that different systems and tools had  different constraints on how to process and print addresses on letters  and parcels.</p><blockquote dir="ltr"><p><strong>NOTE </strong></p><p>If  you are surprised about this low level of harmonization, think about  what it means to modify a basic type and roll out the modifications  across all systems at the same time (see Section <a>18.4.9</a> for details). Inpractice, fundamental service data types must be stable.</p></blockquote><p>Does  this mean that you can’t have harmonized address data types in a SOA?  Not necessarily. If you are able to harmonize, do it. Harmonization  helps. However, don’t fall into the trap of <em>requiring</em> that data types be harmonized. This approach doesn’t scale.</p><p>If  you can’t harmonize an address type, does this mean that all consumers  have to deal with the differences between multiple address types? No.  The usual approach in SOA is to introduce a composed service that allows  you to query and modify addresses (composed services are discussed in <a>Chapter 6). This service then deals with differences between the</a> backend systems by mapping the data appropriately.</p><p>Note  that with this approach, there’s still no need to have one common view  to addresses. If you get new requirements, you can simply introduce a  second address service mapping the additional attributes to the  different backends. Existing consumers that don’t share the additional  requirements will not be affected.</p><p><span style="color: #800000;"><strong><br /></strong></span></p>]]></content:encoded><wfw:commentRss>http://web.bearsols.com/development-design/web-services/loose-coupling-in-a-service-oriented-architecture-by-oreilly-media/feed</wfw:commentRss><slash:comments>0</slash:comments></item><item><title>Dealing with Loose Coupling in a Service-Oriented Architecture (By: O&#8217;Reilly Media)</title><link>http://web.bearsols.com/development-design/web-services/dealing-with-loose-coupling-in-a-service-oriented-architecture-by-oreilly-media</link><comments>http://web.bearsols.com/development-design/web-services/dealing-with-loose-coupling-in-a-service-oriented-architecture-by-oreilly-media#comments</comments><pubDate>Fri, 08 Oct 2010 09:18:12 +0000</pubDate><dc:creator>anhnl</dc:creator><category><![CDATA[Web Services]]></category><guid isPermaLink="false">http://web.bearsols.com/?p=3409</guid><description><![CDATA[Dealing with Loose Coupling in a Service-Oriented ArchitectureIn this conclusion to a two-part article series on loose coupling in SOA, we wrap up our discussion of the forms of loose coupling, and explain how to handle its complexity. This article is excerpted from chapter four of the book SOA in Practice: The Art of Distributed [...]]]></description><content:encoded><![CDATA[<p><span style="color: #800000;"><strong>Dealing with Loose Coupling in a Service-Oriented Architecture</strong></span></p><p>In this conclusion to a two-part article series on loose coupling in SOA, we wrap up our discussion of the forms of loose coupling, and explain how to handle its complexity. This article is excerpted from chapter four of the book SOA in Practice: The Art of Distributed System Design, written by Nicolai Josuttis (O&#8217;Reilly, 2008; ISBN: 0596529554). Copyright © 2008 O&#8217;Reilly Media, Inc. All rights reserved. Used with permission from the publisher. Available from booksellers or direct from O&#8217;Reilly Media.</p><p>4.2.4 Weak Type Checking</p><p>Another good example of the complexity of loose coupling has to do with the question of whether and when to check types. Most of us have probably learned that the earlier errors are detected, the better. For this reason, programming languages with type checking seem to be better than those without (because they detect possible errors at compile time rather than runtime).</p><p>However, as systems grow, things change. The problem is that type checking takes time and requires information. In order for the SOA infrastructure (ESB) to check types, it needs to have some information about those types. If, for example, types are described using XML, the ESB will need the corresponding XML schema file(s). As a consequence, any modifications of the interface will not only affect both the provider and the consumer(s), but also the ESB. This means that mechanisms and processes will be required to synchronize updates with the ESB. And if the ESB uses adapters for each provider and consumer, you might have to organize the deployment of these updates to all adapters. This is possible, but it leads to tighter dependencies than a policy where interface modifications affect only providers and consumers. For this reason, it might be a good idea to make the ESB generic. In general, interface changes should only affect those who use the interface as a contract, not those who transfer the corresponding data. If the Internet had had to validate the correctness of interfaces, it would never have been able to scale.</p><p>Now, you might come to the conclusion that you should always prefer generic interfaces to strict type checking in large systems. The extreme approach would be to introduce just one generic service for each system, so that the service interfaces never change: all you change are implementations against the interface. Note, however, that at some stage, your system will have to process data, and whether you can rely on that data being to some extent syntactically correct will affect your code. So, in places where business data gets processed, strong type checking helps. The only question is how stable the data is.</p><p>Say, for example, that your services exchange some string attributes. If the attributes are pretty stable, a typed service API that specifies each attribute explicitly is recommended. When a new attribute comes into play, you can introduce a new (version of the) service with the additional attribute. On the other hand, if the attributes change frequently, a key/value list might make sense. The right decision to make here depends on so many factors that a general rule is not useful. For these kinds of scenarios, you have to find the right amount of coupling as the system evolves. Note, however, that explicit modeling of attributes makes it easier to write code that processes the data (for example, you can easily map data in different formats when composing services in so-called orchestration engines). On the other hand, having no generic approach would be a very bad mistake when binary compatibility is a must. For example, a technical header provided for all service messages should always have some ability to be extended over the years without breaking binary compatibility (see Section 15.4).</p><p><span style="color: #800000;"><strong>Dealing with Loose Coupling in a Service-Oriented Architecture &#8211; 4.2.5 Binding</strong></span></p><p>Binding (the task of correlating symbols of different modules or translation units) allows a form of loose coupling that is similar to weak type checking. Again, you have to decide between early binding, which allows verification at compile or start time, and late binding, which happens at runtime.</p><p>4.2.6  Platform Dependencies</p><p>In Table 4-1, there are two forms of coupling that deal with the question of whether or not certain platform constraints apply. Making a decision about the general one, platform dependencies, is easy. Of course, you have more freedom of choice if platform-independent solutions are preferred over strong platform dependencies. The second form is discussed next.</p><p>4.2.7  Interaction Patterns</p><p>A special form of platform dependencies has to do with which interaction patterns are used in service signatures (i.e., which programming paradigms are provided to design service interfaces). Which are the fundamental data types, and how can you combine them? A wide range of questions must be considered:</p><p>1. Are only strings supported, or can other fundamental data types (integers, floats, Booleans, date/time types, etc.) be used?<br />2. Are enumerations (limited sets of named integer values) supported?<br />3. Can you constrain possible values (e.g., define certain string formats)?<br />4. Can you build higher types (structures, records)?<br />5. Can you build sequence types (arrays, lists)?<br />6. Can you design relations between types (inheritance, extensions, polymorphism)?</p><p>The more complicated the programming constructs are, the more abstractly you can program. However, you will also have more problems mapping data to platforms that have no native support for a particular construct.</p><p>Based on my own experience (and that of others), I recommend that you have a basic set of fundamental types that you can compose to other types (structures, records) and sequences (arrays). Be careful with enumerations (an anachronism from the time when each byte did count—use strings instead), inheritance, and polymorphism (even when XML supports it).</p><p>In general, be conservative with types, because once you have to support some language construct, you can’t stop doing so, even if the effort it requires (including the ability to log and debug) is very high. For more on data types, see Section 15.5.</p><p><span style="color: #800000;"><strong>Dealing with Loose Coupling in a Service-Oriented Architecture &#8211; 4.2.8 Compensation</strong></span></p><p>Compensation is an interesting form of loose coupling. It has to do with the question of transaction safety. If you have to update two different backends to be consistent, how can you avoid problems that occur when only one update is successful, resulting in an inconsistency? The usual approach to solving this problem is to create a common transaction context using a technique such as two-phase commit (2PC). With this approach, you first perform all the modifications on both backends, except for the final “switch to the updated data”; then, if no system signals a problem, the final commit performs the update on both systems.</p><p>2PC is one of the most overhyped attributes of middleware. Whenever there is an evaluation of middleware, the question of whether 2PC is supported arises. However, in practice, 2PC is rarely used in large systems because all the backends have to support it, it requires some programming effort, and it binds resources. The main problem is that all systems have to be online, and have to provide resources until the modifications are complete on the last system. Especially when there is concurrent data access, this can lead to delays and deadlocks.</p><p>A more loosely coupled way to ensure overall consistency is compensation. In this approach, you modify the first backend, and then modify the second backend; if only one modification is successful, you then “compensate” for the problem appropriately. For example, you might revert the successful modification to restore the consistent situation that existed before the modifications began, or send a problem report to an error desktop where somebody can look into the details and deal with it manually.</p><p>The advantage of compensation is that system updates don’t have to be performed synchronously (some backends might even be offline while they are being updated). The drawback is that you have to explicitly provide and call services that revert previous services or programs for manual error handling.</p><p>BPEL, the process execution language of Web Services, directly supports compensation (see Section 7.4.2).</p><p><span style="color: #800000;"><strong>Dealing with Loose Coupling in a Service-Oriented Architecture &#8211; 4.2.9 Control of Process Logic</strong></span></p><p>Process-control decisions can also lead to different forms of coupling. Having one central component controlling the whole process logic creates a bottleneck because each involved system must connect with it. Failure of such a central component will stop the whole process.</p><p>On the other hand, if you have decentralized or distributed control (where each component does its job and knows which component will continue after) you avoid bottlenecks, and if some systems fail, others can still continue to work. See Section 7.6 for details.</p><p>4.2.10  Deployment</p><p>Whether you require that system updates be deployed simultaneously, or at different times, is related to coupling. Of course, systems are bound more tightly to each other if it is required that they update synchronously. The more loosely coupled approach of updating at different times, however, leads to a very important drawback: the need for migration, which leads to versioning (see Chapter12).</p><p>4.2.11 Versioning</p><p>Your versioning policy also has something to do with tight or loose coupling. If a system provides certain data types that are used by a consumer, you’ll have problems when the provider adds new attributes. If the provider introduces a new type version, the consumer will have to upgrade explicitly to this new type; otherwise, the provider will have to support both types. If, on the other hand, the provider just adds the attribute to the existing type, this might cause binary compatibility issues, and require the consumer to recompile its code or use another library.</p><p>With a more loosely coupled form of data type versioning, the consumer won’t have to do anything as long as the modifications are backward compatible.</p><p>However, as discussed in Section 12.3, achieving loose coupling here can be very complicated. Again, it’s up to you to decide on your policy by discussing the pros and cons.</p><p><span style="color: #800000;"><strong>Dealing with Loose Coupling in a Service-Oriented Architecture &#8211; 4.3 Dealing with Loose Coupling</strong></span></p><p>The forms of loose coupling discussed in this chapter are only some (more or less typical) examples. Again, note that there are no hard and fast rules: you will have to decide on the appropriate amount of loose coupling for your specific context and architecture.</p><p>I have seen very different decisions made with regard to different types of coupling. As I mentioned earlier, the policy of one of my customers was to avoid asynchronous communication whenever possible, based on the experience that it led to race conditions at runtime that were very hard, or even impossible, to reproduce in a development environment, and therefore almost impossible to fix. Another customer in the same domain had a policy that synchronous calls were allowed only for reading service calls because the performance was not good enough for writing service calls.</p><p>Note that you might also have to decide about combinations of forms of loose coupling. For example, one important decision you’ll have to make is whether an ESB should be separated from a backend via a protocol, or via an API (see Section 5.3.3). Separating via an API usually means that the ESB provides libraries each backend or backend adapter has to use. So, deployment and binding become issues. On the other hand, using a common API, you can hide some aspects of synchronous or asynchronous communications inside the ESB.</p><p>You might ask which forms of loose coupling are typical. To my best knowledge, there is no answer. All I can say is that the larger systems are, the more loosely they should be coupled.</p><p>4.4  Summary</p><p>*<br />Loose coupling is a fundamental concept of SOA (and large distributed systems in general) aimed at reducing dependencies between different systems.<br />*<br />There are different forms of loose coupling, and you will have to find the mixture of tight and loose coupling that’s appropriate for your specific context and project.<br />*<br />Any form of loose coupling has drawbacks. For this reason, loose coupling should never be an end in itself.<br />*<br />The need to map data is usually a good property of large systems.</p>]]></content:encoded><wfw:commentRss>http://web.bearsols.com/development-design/web-services/dealing-with-loose-coupling-in-a-service-oriented-architecture-by-oreilly-media/feed</wfw:commentRss><slash:comments>0</slash:comments></item><item><title>Eight Steps to Web Success (By: Ken Brown)</title><link>http://web.bearsols.com/development-design/web-authoring/eight-steps-to-web-success-by-ken-brown</link><comments>http://web.bearsols.com/development-design/web-authoring/eight-steps-to-web-success-by-ken-brown#comments</comments><pubDate>Fri, 08 Oct 2010 09:04:44 +0000</pubDate><dc:creator>anhnl</dc:creator><category><![CDATA[Web Authoring]]></category><guid isPermaLink="false">http://web.bearsols.com/?p=3407</guid><description><![CDATA[Eight Steps to Web SuccessMany people ask me, &#8220;How do I become successful in a web business?&#8221; If you have asked this same question then continue reading. After absorbing and then applying the concepts in this list you won&#8217;t have any excuses for not succeeding. There is a simple truth in all of these tips [...]]]></description><content:encoded><![CDATA[<p><span style="color: #800000;"><strong>Eight Steps to Web Success</strong></span></p><p>Many people ask me, &#8220;How do I become successful in a web business?&#8221; If you have asked this same question then continue reading. After absorbing and then applying the concepts in this list you won&#8217;t have any excuses for not succeeding. There is a simple truth in all of these tips and hints. These are the secrets of winning websites of today and the business men and women who consistently follow this formula will have a distinct advantage over the long term.</p><p>Most will say, &#8220;Yeah, I know all that already.&#8221; Then my response is, &#8220;Why aren&#8217;t you doing better?&#8221; You know how, but winners know that it&#8217;s action that produces a Web millionaire. Consistent execution of simple steps produces vital winning edges over other web site owners.</p><p>There are millions of individuals and entrepreneurs trying to make money on this Internet cash wagon. But just like professional football, basketball and baseball not everyone makes it. It all comes down to execution of fundamentals and long term consistency. Those people that wake up everyday and take correct action toward their internet goals are going to win, big time.</p><p>There is a story about Walter Payton, the great Chicago Bears running back. During the summer months, before the preseason started, Walter would be out running hills. There is a hill that is almost straight up in the Chicago area. This was Walter&#8217;s training machine. In the morning, he would come to this hill and begin doing sprints straight up, pumping his legs as hard as he could all the way to the top. Then he would go down the hill and start all over.</p><p>Other team members would come out and laugh at first about the workout and then they would try it. The first couple of attempts they could stay with Walter. Then he would do another and another and pretty soon, Walter would still be running the hill and his friends would be sucking air at the bottom. When the season would start, tacklers would try to stop Walter, but he would just keep churning his legs until the other guys let go. All those silly little steps up the hill made Walter the best during his career.</p><p>It was all about the fundamentals for Walter Payton and it is all about the fundamentals for you and your internet business. These are the eight things that you have to do everyday, just keep going up that hill.</p><p><span style="color: #800000;"><strong>Eight Steps to Web Success &#8211; Step 1: Provide Excellent Content</strong></span></p><p>Fresh content is what drives the Internet. Newspaper publishers learned this lesson many years ago, shortly after the printing press was developed. People, our customers, want to come back to our site every day. But you have to give them a reason to spend time with you.</p><p>If your customer comes to your site and doesn&#8217;t find something new, then that customer may never come by to see you ever again. What can you do to provide new information? What is it about your business that is exciting and changing? Do you have a new product, a new business process, new people working for you, or even a new client that might be exciting to current customers or potential customers?</p><p>My son-in-law runs a recording studio, Apocalypse Cow, and for him, it is the bands that come into their studio every month that is newsworthy. Who is in recording? What kind of music are they playing? Does the band have a new CD out? Is there new equipment in the studio that clients/bands can use or might be interested in? Tell everybody about it. Put it on your website. That is new content and that is what people want.</p><p>New content drives customer traffic to your site. If you enjoy reading comic strips like Dilbert, then you understand the term &#8220;new content&#8221;. Everyday, first thing in the morning you want to see what crazy idea the pointy haired boss has hatched. If Scott Adams were to quit developing new comics everyday, you would quit going to his website, right?</p><p>I can hear you now, &#8220;Ken, it is easy for you because you&#8217;re in the computer industry where there is always something new. If you were in my industry, you would really have a problem.&#8221; What industry are you in? Gardening? Maybe you consider that a hard to find new content industry.</p><p>Let&#8217;s analyze the gardening industry. I see four seasons happening in the garden industry. When spring comes, people are preparing the soil for planting. Do you have new tools to share with your customers? Are there new hybrid seeds that are stronger against insects and disease? What plants flower in April, how about May and then June, July, see where I am going with this? Every month you are preparing, harvesting or enjoying some aspect of your garden. Tell your customers. They truly want to know about it.</p><p>Make it easy for them to find the new content. Sometimes Web masters hide the new content and make it so hard to locate the new stuff. Put it right there on the first page. Forget the beautiful pictures of you hard at work. Show us the new stuff. If you are in the travel industry, maybe those photos are important, but for nuts and bolts industries tell me what&#8217;s new and show it to me right away. Don&#8217;t make me hunt for it. I am busy.</p><p>So step 1 is to create new content on a regular basis. Depending on your industry and your competitors, that could mean daily, weekly, monthly or quarterly. Personally, I think if it is longer than monthly, you aren&#8217;t trying hard enough.</p><p><span style="color: #800000;"><strong>Eight Steps to Web Success &#8211; Step 2: Develop Links with Other Sites</strong></span></p><p>Well, if you have been in the website creation business for more than one day, then you probably have heard this repeated over and over. But going back to our idea of doing the fundamentals, then you need to include this in your list of things to do. This is something you should be doing everyday.</p><p>Yes, everyday or you should pay someone else to do it for you. With the new search engine optimization rules, developing links with other sites is so important to your search engine positioning. Find other sites in your industry or related industries and then get to know them.</p><p>Notice I didn&#8217;t say to bombard them with spam until they submit to your will. No, develop a relationship with others. Google wants others to be linked with you that are considered related in subject, scope or industry. When you develop a relationship then if you ask to exchange links, there won&#8217;t be a complete rejection. At the very least, the other person will spend some time evaluating your request. You are less likely to reject a friend than some stranger walking down the street.</p><p>If you sell guitars and you have developed a relationship with a recording studio, then ask for a link. You are in non-competing industries, yet they are related industries. A perfect match.</p><p>You will find that if you do step one very well, provide excellent content, then more web masters will be interested in linking with you. If you go to a website and you can&#8217;t tell what is going on after looking at it for twenty minutes then you probably don&#8217;t won&#8217;t to link with them. Go after quality. You are remembered by the company you keep.</p><p>Make it easy for companies to link with you. Provide the link script and maybe a gif file that users can just copy and paste into their site. Bingo, you are linked and driving traffic to your site.</p><p>The most important thing about step number 2 is to do it everyday. Setting up link exchanges can&#8217;t be a hit or miss proposition. You must treat it like a fundamental and do it daily. Create your new content pages then contact a related business to inquire about a link exchange and move up in Page Rank.</p><p><span style="color: #800000;"><strong>Eight Steps to Web Success &#8211; Step 3: Contact the Search Engines and Let Them Know You Exist</strong></span></p><p>Another fundamental. Who can help you get customers? The search engines. If you don&#8217;t show up on the search engines you might as well not exist. Okay, that was overstated, and I am sure I will get shot down on this comment. There are plenty of businesses that succeed just on word of mouth and reputation. But, somebody has to build a street to your door.</p><p>You can build a business, but if no one knows about you, then who do you think will stop by to buy something? You can submit your site to Google for free. You can submit to some of the directories for free, like DMOZ and even others if you don&#8217;t mind being an editor for them. But for some of these, you need to be willing to spend a couple of hundred dollars.</p><p>These are paid links that will help you to score high on Google. Other search engines and directories you may want to submit to include Yahoo, LookSmart, Overture, Gimpsy, JoeAnt, GoGuides and Galaxy. There are many others, but this is a good start to get you listed and showing up immediately. Some of these you can submit a free listing to, but chances are good you will never show up on their directory or it could take four months or more.</p><p>How do you drive traffic to your web site? Search engines will definitely rank high as a start to building customers. But you also need to have other reputable sites show you as a partner. Like a brick and mortar store, you need to advertise in visible venues, both on the internet and in relevant magazines. Word of mouth can drive business your way, when you offer quality products, an affordable price or exemplary service. Another way to increase traffic is to create an RSS Feed to your web site and that is the next topic.</p><p><span style="color: #800000;"><strong>Eight Steps to Web Success &#8211; Step 4: Create RSS Feeds to All Your Content</strong></span></p><p>What is RSS? Really Simple Syndication is the name for the letters. But what does that really mean? Basically, it is a way to distribute your news or let people know when you have new content on your site.</p><p>RSS is more pull technology instead of push technology. With Email addresses you send out information. But RSS allows you to create an XML file with titles, descriptions and date of last update and then make it available to software that reads it. People have to come to your site to get your XML file. You don&#8217;t send it to them. There are RSS Readers available such as, Pluck, that allow your internet browser to poll an RSSFeed to see if there is any updated content and then it delivers the content to your desktop.</p><p>So what does this mean to a web business person? It is another opportunity for you to give your message to potential customers. A person may be reluctant to give you his or her email address. Now they can control the information they get from you, getting it when and where they want.</p><p>I have created my RSS feed XML file, now what? Make people aware you are providing this service. Some people use orange buttons that say &#8220;RSS&#8221; or &#8220;XML&#8221; and others just provide a link to their XML file. Put the link on your web site, every page would be good and your customers that are interested in the service just click on the link and pick it up with their RSS reader.</p><p>You can also contact the RSS feed directories to catalog your RSS feed, which may draw additional traffic to your site.</p><p><span style="color: #800000;"><strong>Eight Steps to Web Success &#8211; Step 5: Send an Email Newsletter Once a Month or More Often</strong></span></p><p>This step is just an extension of the last step. Similar to the RSS feed in the fact you are sharing information with people. There is nothing wrong with the information in your newsletter being the same news in your RSS feed. It is just formatted a little differently.</p><p>Make a decision how often you are going to send out your newsletter and then consistently send it. You can dress it up as HTML with images or make it a simple letter with links to your important &#8220;new&#8221; content. If your main source of revenue is from advertising, then you may want to send it out weekly, so your users come back to your site and view your advertising.</p><p>The same rules you learned in step one apply to this step. What can you do to provide new information? What is it about your business that is exciting and changing? Do you have a new product, a new business process, new people working for you or even a new client that might be exciting to current customers or potential customers? Something exciting and new is happening in your business everyday and every week. What is it? Tell the people about it and make them want to come back to your site.</p><p>Who do you send email? The best way is to have a database on your site and provide a link for interested visitors to sign up for your newsletter. This way they have requested to be informed of new information. The second way is to ask them to be notified of new products and such when they purchase something from you. It doesn&#8217;t matter what method you used to generate their email address, provide a way for them to opt-out of your newsletter.</p><p>Every time I write a letter to my US Senator, I begin receiving emails from his party affiliation. I’ve got to tell you, it sucks. I didn&#8217;t ask to be put on their newsletter list, I disagree with their politics, which is why I wrote him in the first place, and I don&#8217;t want their propaganda. But they do make it easy for me to &#8220;cancel my subscription&#8221;. Make it easy for your users, too and then get their name off of that list.</p><p>I was in the direct mail industry for 13 years as a computer person, and one truth is similar with direct mail and the internet. People say they hate receiving newsletters in their email. But they only hate the ones they don&#8217;t like. Meaning if you love your Eddie Bauer catalog, but don&#8217;t like your Penney&#8217;s catalog, you will say you hate direct mail catalogs. The truth is you would be disappointed if you stopped receiving your Eddie Bauer catalog. Make your newsletters informative and fun so your customers love receiving it each week.</p><p>Make sure there are links back to your web site in every correspondence you send. With everyone jumping on the broadband Internet backbone more and more people will be able to click on that link and instantly be connected to your site.</p><p>So send out a newsletter often. Provide informative well written content. Make sure it links back to your site and enjoy the revenue from happy, satisfied, repeat customers.</p><p><span style="color: #800000;"><strong>Eight Steps to Web Success &#8211; Step 6: Come Up with Software Tools that Customers Want to Add to Their Site with Your Link On It</strong></span></p><p>This is such a strong linking tool. Find software tools people want and provide it to them. Imagine a customer coming to your website and they see this cool tool that measures response rates, checks for broken links on your site or something else really cool. You tell them that you will provide them this tool for free so they can use it on their site.</p><p>What is going to be the response to such a request? “Yeah man, I need that cool tool on my site!” My customers are going to love it. So they download the code, most of the time it is only a simple copy and paste of HTML. So they embed the new code into their web page and people start using it.</p><p>From here there are two avenues. When they click on the tool they open a new browser and your site is displayed with the information requested. That would be nice having users automatically redirected to your site. Or at the very least, the tool has your logo at the top of it and a link embedded in the site providing you with another link to your site. See Step 2 Develop links with other sites.</p><p>This process takes many forms. Sometimes it is just a request to put another company&#8217;s logo on your page with a link. I have seen web masters that have you put a little certificate exclaiming your website as star certified. But the best way is to have useful tools that others want to offer their customers. Some people charge for them, others provide them for free, knowing it is going to generate more traffic.</p><p>This is a great traffic builder and potential revenue generator. All the best websites use this technique to grow their internet business.</p><p><span style="color: #800000;"><strong>Eight Steps to Web Success &#8211; Step 7: Provide Excellent Service and Stay on the Leading Edge</strong></span></p><p>Many years ago, Tom Peters wrote a book on business excellence. He identified companies that were practicing excellence in all aspects of business, from excellence in customer service, to new product development and speed to market. Who was replacing inventory on a regular basis? Who went the extra mile for their customers? Who provided a clean environment for employees and customers? Who took care of their employees?</p><p>Even though it was written over 20 years ago, the principles that were expressed are just as true today. What have you done for your customer today? If they have a problem with your billing or returns department do they have trouble contacting you? If you promise to ship out a product today, do you follow-up on that promise? Does your web site reflect sloppiness or excellence in design? Do you claim that your site is family friendly and then provide advertising of porn?</p><p>When customers come to your site, do they want to come back? Do they tell their friends and family about you? Are you hard to work with? Ask yourself these questions and then ask your customers and see if you both agree with the answers. You might be surprised. There is an old cliché that is appropriate for this topic: Under promise and over deliver. Give your customers more than they bargained for and watch them and their friends flock to your door.</p><p>The exciting part of the book was that the companies that were excellent in Tom Peters&#8217; opinion were also charging the most for their products. If you provide perceived additional value, you can increase revenues per sale. This is more than just spending more money on advertising. It is going the extra mile on each and every sale.</p><p>When you wake up tomorrow morning ask yourself, “What can I do today to add value to a product or service that I now provide?” This doesn&#8217;t mean you give away the store. People are willing to pay more for additional services. We were discussing in a meeting today, that some of the ladies would like to see automobile gas stations go back to the full service pump, where someone else would pump your gas into your car for you. And they all said they were willing to pay more for that service.</p><p>We have all used shareware software programs that met a need we had at a particular moment. Many of us decided to purchase at a much higher price a competitors product because it had features we felt we needed and we were willing to spend more to receive those features. In most cases significantly more money, 10 to 25 times more money for additional added value.</p><p>So spend time on a regular basis determining what products or services you can add that would add value to your business.</p><p><span style="color: #800000;"><strong>Eight Steps to Web Success &#8211; Step 8: Continuous Action Theory</strong></span></p><p>This is a concept I have been trying to hammer home this whole article. The continuous action theory emphasizes the need to do something on a regular basis to help you reach your goals. Wake up each morning and say, &#8220;what can I do today to reach my goals?&#8221;</p><p>This list of 8 steps is a great start. Put this list next to your computer each morning and don&#8217;t do anything else until you have accomplished the items on this list. You will see your web business move forward. You will have more web sites linking to you. More customers will come back to see your new content. People receiving email from you will want to read more about your business and will click on the links provided in the email.</p><p>I have a friend that sometimes runs into problems with money. He knows that his family spends too much money, he wants to control his spending, and he knows the right thing to do. Many of you will read this article and say, yes, these steps are the correct process to building a web business. But will you take the correct steps?</p><p>Will you put continuous action into reality? Once you start doing the right things it is easy to keep it going. The old law of inertia, a body in motion will remain in motion and requires less energy to keep it in motion applies here. Take action today and then again tomorrow and the next day to make it happen for your web business.</p><p>It takes 21 days to create a new habit. Mark on your calendar 21 days into the future and then follow these steps for 21 days. See what happens, you will be pleasantly surprised.</p>]]></content:encoded><wfw:commentRss>http://web.bearsols.com/development-design/web-authoring/eight-steps-to-web-success-by-ken-brown/feed</wfw:commentRss><slash:comments>0</slash:comments></item><item><title>Using Adobe GoLive CS, Part 1 (By: Sams Publishing)</title><link>http://web.bearsols.com/development-design/web-authoring/using-adobe-golive-cs-part-1-by-sams-publishing</link><comments>http://web.bearsols.com/development-design/web-authoring/using-adobe-golive-cs-part-1-by-sams-publishing#comments</comments><pubDate>Fri, 08 Oct 2010 08:56:43 +0000</pubDate><dc:creator>anhnl</dc:creator><category><![CDATA[Web Authoring]]></category><guid isPermaLink="false">http://web.bearsols.com/?p=3405</guid><description><![CDATA[Using Adobe GoLive CS, Part 1Although Dreamweaver is the tool of choice for many Web designers, Adobe&#8217;s GoLive also offers a professional quality Web authoring tool that integrates natively with numerous other industry leading products, such as photoshop. Today, learn how to get started, and start on your way to using Adobe&#8217;s Creative Suite like [...]]]></description><content:encoded><![CDATA[<p><span style="color: #800000;"><strong>Using Adobe GoLive CS, Part 1</strong></span></p><p>Although Dreamweaver is the tool of choice for many Web designers, Adobe&#8217;s GoLive also offers a professional quality Web authoring tool that integrates natively with numerous other industry leading products, such as photoshop. Today, learn how to get started, and start on your way to using Adobe&#8217;s Creative Suite like a pro. (This chapter comes from Teach Yourself Adobe Creative Suite, by Mordy Golding, Sams, 2004, ISBN: 067232752X.)</p><p><em>Creative Suite</em>, by Mordy Golding, Sams, 2004, ISBN: 067232752X.)</p><p><a rel="nofollow" href="http://www.amazon.com/exec/obidos/ASIN/067232752X/develshedinc-20/104-8293529-2444712?dev-t=mason-wrapper%26camp=2025%26link_code=xm2"><img src="http://images.devshed.com/da/stories/Using%20Adobe%20GoLive%20CS%20123/showcover.jpg" border="0" alt="Using Adobe GoLive CS" hspace="5" vspace="2" align="left" /></a>Adobe  InDesign CS and Adobe GoLive CS are kindred spirits. Both of these  applications are what I call &#8220;aggregators,&#8221; meaning you use them to  bring together text, images, and multimedia elements created elsewhere.  Yes, you can do some drawing in InDesign, and yes, you can do image  compression, cropping, and animation in GoLive; but the heavy lifting in  terms of creating image assets is done in Adobe Photoshop, ImageReady,  and Illustrator.</p><p>None of the graphics tools in the Creative Suite,  however, have anything remotely like GoLive&#8217;s incredibly powerful site  management capabilities for links. <a href="http://www.devarticles.com/#" target="_blank">Web sites<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a> can have dozens, hundreds, even thousands of pages, each including  multiple links to additional pages, images, and more. Long, long ago  (like 1992), most people kept track of URLs by keeping copious notes and  by testing, testing, testing. These days, though, you leave that  stupefying job to GoLive.</p><blockquote><hr /><strong>What&#8217;s New in GoLive CS? -</strong> New features in GoLive CS are support for CSS Level 2, Syntax hinting,  and code- completion. Package for GoLive is an innovative new way of  reusing print assets on the Web. Queries for finding site elements and  Collections for grouping pages together are two more unique GoLive CS  tools. We&#8217;ll cover these new features as well as the basics of Web site  creation as we continue through this chapter.</p><hr /></blockquote><p><strong>Introduction to GoLive CS</strong></p><p>Like  the other applications in the Creative Suite, GoLive helps you out when  you first open the application by greeting you with a few basic choices  in the Welcome dialog box: New Page, New Site, and Open. If you prefer  not to have this dialog salute you every time you open the application,  you can disable it by unchecking Show This Dialog at Startup in the  lower-left corner (see Figure 9.1). No worries; if you change your mind,  you can turn it back on again in the GoLive preferences. Our  suggestion? Turn it off. Anything you can do there you can also do after  the application has launched, thank you very much.</p><p><strong><img src="http://images.devshed.com/da/stories/Adobe%20GoLive%20CS/mini-09fig01.jpg" border="0" alt="" hspace="0" align="baseline" /></strong></p><p><strong>Figure 9.1</strong> <em>GoLive  CS&#8217;s Welcome screen offers the choice of creating a new page, creating a  new site, or opening an existing page or site. Hold down on the Open  button for a moment to access a list of recently used files.</em></p><p>What do the choices in the Welcome screen do? If you choose New Page, you&#8217;ll get a new blank generic HTML page, called <tt>untitled.html</tt>.  If you choose New Site, you&#8217;ll invoke the GoLive Site Wizard, which  steps you through the creation of a site. We&#8217;ll go over the steps in the  wizard shortly, but for now you need to know only this: To take  advantage of GoLive&#8217;s incredibly powerful site management and link  tracking tools, you always need to work from within a site window, and  that is exactly what the Site Wizard creates. So forego the single new  page in favor of a new site and you&#8217;ll be on the right track. You will,  of course, be able to create new pages from within your site.</p><p>Let&#8217;s define &#8220;site&#8221; at this point. A site, in GoLive-speak, consists of the following things: a site file, a <tt>web-content</tt> folder, a <tt>web-data</tt> folder, and a <tt>web-settings</tt> folder. These four items are automatically created on your hard drive  whenever you create a new GoLive site or import an existing site into  GoLive, and they are neatly tucked into an umbrella folder that keeps  them all together. Double- clicking on a site file opens it up in a site  window. The site file is the shepherd that keeps track of the sheep,  the sheep being the other three folders and any items included in them.</p><blockquote><hr /><strong>Note -</strong> Using GoLive, you can create as many sites as you want. You can have  more than one site window at a time, and you can even drag and drop from  one to another. Use caution when working with more than one site window  at a time, though. It&#8217;s very easy to inadvertently save work into the  wrong one, and it can be a real pain to put things right again. If you  are a novice at GoLive, you are better off opening only one site file at  a time.</p><p><span style="color: #800000;"><strong>Using Adobe GoLive CS, Part 1 &#8211; Creating a Project</strong></span></p><p>Let&#8217;s begin. Open GoLive, say hello to the Welcome screen, and then dismiss it so that we can find out where those same options are when you are in GoLive proper.</p><p>The New Page and New Site commands are  conveniently found in the File menu, but look closely at what else is  hiding there. Under New Special are a host of additional document types  you can create—everything from XHTML pages to plain old text (TXT) files  (see Figure 9.2). XML, <a href="http://www.devarticles.com/#" target="_blank">CSS<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a>,  SMIL, JavaScript, QuickTime, Perl, PHP, MMS, and other Web-related file  formats are documents GoLive CS can handle with ease. In this chapter  we&#8217;ll cover only the basic file types, but be aware that GoLive CS has a  depth and breadth beyond what is discussed here.</p><p><strong><img src="http://images.devshed.com/da/stories/Adobe%20GoLive%20CS/mini-09fig02.jpg" border="0" alt="" hspace="0" align="baseline" /></strong></p><p><strong>Figure 9.2</strong> <em>GoLive can create various documents suitable for the Web via the New Special command in the File menu.</em></p><p>Also  located in the File menu are the Open and Open Recent commands. The  Open Recent submenu is especially helpful because it lists not only  recently opened sites, but also individual <a href="http://www.devarticles.com/#" target="_blank">HTML<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a> pages and other types of documents you may have opened recently. At the  very bottom of the Open Recent submenu is the option Clear Entries,  which will delete everything in the list and begin building the recent  files list all over again.</p><p><strong>Creating a Site</strong></p><p>Before anything can be listed in the Open Recent submenu, though, it must be created. Press (<img src="http://www.internet4classrooms.com/command_key.gif" alt="" width="14" height="13" align="bottom" />-Option-N) [Ctrl+Alt+N] to invoke the GoLive Site Wizard (see Figure 9.3).</p><p><strong><img src="http://images.devshed.com/da/stories/Adobe%20GoLive%20CS/mini-09fig03.jpg" border="0" alt="" hspace="0" align="baseline" /></strong></p><p><strong>Figure 9.3</strong> <em>The GoLive Site Wizard steps you through the creation or importation of a site.</em></p><blockquote><hr /><strong>Note -</strong> Here&#8217;s a suggestion for proceeding through the Site Wizard  successfully: Read the instructions on each screen before clicking any  buttons. No one likes to read dialog text, but because you&#8217;ve opted to  purchase this hefty tome, we&#8217;ll assume you are up to the task.</p><hr /></blockquote><p>The  first question you need to answer is whether you want a Single User  site or a Version Cue Project. Choose Single User and click Next. (For  information on creating Version Cue projects, refer to Chapter 11,  &#8220;Using Version Cue.&#8221;)</p><p>In the next screen you&#8217;ll have several  options. Choose Blank Site if you are starting from scratch. If you need  to bring an existing site into GoLive that has been designed by someone  else or in another Web authoring application, choose Import from  Folder. If the existing site you want to work on is already online, then  Import from Server is what you need. Finally, you can create a site  from a template if you have previously placed sites into GoLive&#8217;s <tt>Site Templates</tt> folder.</p><blockquote><hr /><strong>Note -</strong> Import from Folder is what you should opt for if you want to import a  site that was created in an older version of GoLive. GoLive CS can  directly open GoLive 6 site files, but sites created before GoLive 6  should be imported.</p><hr /></blockquote><p><strong>Creating a Blank Site</strong></p><p>The  simplest of the New Site options is Blank Site. Click the radio button  for Blank Site, click Next, and you&#8217;ll be asked to name your site. Give  the site a name and click Next again, and you&#8217;ll be asked to designate a  location for your site. Browse to the location of your choice, click  Choose, and click Finish. GoLive creates the site and opens it.</p><p><span style="color: #800000;"><strong>Using Adobe GoLive CS, Part 1 &#8211; Importing a Site from a Folder</strong></span></p><p>If you select Import from Folder and click  Next, you&#8217;ll be asked to locate the existing site you want to import.  There are two Browse buttons in this screen. The top Browse button is  for locating the root folder of the site you want to import; the bottom  one is for locating the home page of that site. Although you can use  either button, it&#8217;s easiest to use the bottom one. Click it and navigate  to the home page (often called <tt>index.html</tt> or <tt>index.htm</tt>)  of the existing site. After doing so, you&#8217;ll notice that the path to  the site you are about to import is shown in the Site Wizard (see Figure  9.4).</p><p><strong><img src="http://images.devshed.com/da/stories/Adobe%20GoLive%20CS/mini-09fig04.jpg" border="0" alt="" hspace="0" align="baseline" /></strong></p><p><strong>Figure 9.4</strong> <em>The path to the folder you are going to import is shown in the Site Wizard.</em></p><blockquote><hr /><strong>Tip -</strong> Using the Site Wizard&#8217;s Browse button to navigate to the home page of  an existing site works nicely, but you can also drag and drop the index  page of an existing site right onto the Site Wizard&#8217;s screen to achieve  the same results.</p><hr /></blockquote><p>The last step is to find a home  for the Site File that GoLive will create for the imported site. Name  the new site file, keeping its <tt>.site</tt> extension; browse to a suitable location for it; click Save. GoLive imports the site and opens it.</p><blockquote><hr /><strong>Caution -</strong> Do <em>not</em> put the site file inside the site&#8217;s root folder. It&#8217;s fine to put it on  the same level as that folder, but not inside. The site&#8217;s root folder  is the one that holds the home page.</p><hr /></blockquote><p><strong>Importing a Site from a Server</strong></p><p>Sometimes  you need to import a site that is already online. GoLive CS handles  this task with ease. You have your choice of importing from either an  FTP or an HTTP <a href="http://www.devarticles.com/#" target="_blank">server<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a>.  In the case of an FTP server, you&#8217;ll need the FTP address, login name,  and password; for an HTTP server you&#8217;ll simply need the URL (see Figure  9.5).</p><p><strong><img src="http://images.devshed.com/da/stories/Adobe%20GoLive%20CS/mini-09fig05.jpg" border="0" alt="" hspace="0" align="baseline" /></strong></p><p><strong>Figure 9.5</strong> <em>Depending on whether you choose FTP or HTTP, you&#8217;ll be required to enter certain information.</em></p><p>Begin  by selecting Import from Server, click Next, choose FTP or HTTP, fill  out the appropriate information, and click Next again. Select a name for  the folder that will hold the new site file and its accompanying <tt>web-content</tt>, <tt>web-data</tt>, and <tt>web-settings</tt> folders, and click Next. Use the Browse button to select the location  where the site will be placed, and click Finish. GoLive downloads the  site and opens it.</p><blockquote><hr /><strong>Note -</strong> If you are unsure of the FTP address, login name, and password you need to use, contact your Web hosting service.</p><hr /></blockquote><p><strong>Using the Objects Palette and Toolbar</strong></p><p>Like  other applications in the Creative Suite, GoLive has an impressive  array of palettes and tools accessible from the Window menu. You can, of  course, conFigure the palettes however you&#8217;d like, but for now let&#8217;s  explore the default configuration. Choose Window, Workspace, Default  Workspace to return the palettes to their default locations. For more  information on using palettes, workspaces, and keyboard shortcuts, refer  to Chapter 4, &#8220;The Key That Makes It All Work: Integration.&#8221;</p><p><span style="color: #800000;"><strong>Using Adobe GoLive CS, Part 1 &#8211; The Objects Palette</strong></span></p><p>On the left side of the screen is what appears to be a toolbox similar to that found in Photoshop, ImageReady, Illustrator, and InDesign. Looks, in this case, are deceiving, because in GoLive it is called the Objects palette, and it functions differently than the toolbox in the sibling apps. The Objects palette has a series of square buttons at the top. Clicking a button opens a set of objects in the lower portion of the palette. Hover your mouse over a button, and a ToolTip with the name of that set of objects will pop up. You can also select a set of objects by clicking the Palette Options button at the lower-right corner of the Objects palette and choosing the name of the set from the list. To limit the available objects shown to only those that conform to a specific Document Type Definition (DTD), choose ConFigure from the Palette Options and select the DTD of your choice.</p><p>Although the name of this palette is not Toolbox, you will find that you need to access it just as often as you use the tools in the graphics applications.</p><blockquote><p><strong>Tip -</strong> Those of you  familiar with previous versions of GoLive might want to revert the  Objects palette to its old look. You can easily do that by clicking the  Toggle Orientation button at the lower left of the Object palette.</p><hr /></blockquote><p>You  can use all the objects in the Objects palette (see Figure 9.6) by  dragging and dropping them into place. You can also place many of them  by double-clicking on them.</p><p><strong><img src="http://images.devshed.com/da/stories/Adobe%20GoLive%20CS/mini-09fig06.jpg" border="0" alt="" hspace="0" align="baseline" /></strong></p><p><strong>Figure 9.6</strong> <em>The  default configuration of the Objects palette includes the following  sets of objects: Basic, Smart, Forms, Head, Frames, Site, Diagram,  QuickTime, and SMIL.</em></p><p><strong>The Inspector Palette</strong></p><p>Objects  are conFigured via the context-sensitive Inspector palette. For  example, you could drag and drop a Table object from the Basic set of  the Objects palette onto a page, and then set its attributes, such as  the number of rows and columns or its width and height, via the  Inspector palette. The Inspector palette will change according to  whatever object is currently selected so that you can set the attributes  for that particular object (see Figures 9.7 through 9.9). You can tell  which object is selected by reading the label in the lower-left corner  of the Inspector palette.</p><p><strong><img src="http://images.devshed.com/da/stories/Adobe%20GoLive%20CS/mini-09fig07.jpg" border="0" alt="" hspace="0" align="baseline" /></strong></p><p><strong>Figure 9.7</strong><em> The Inspector palette offers attributes for the currently selected object. This Figure shows a Table object selected.</em></p><p><strong><img src="http://images.devshed.com/da/stories/Adobe%20GoLive%20CS/mini-09fig08.jpg" border="0" alt="" hspace="0" align="baseline" /></strong></p><p><strong>Figure 9.8</strong> <em>The Inspector palette attributes with a<br />Smart Object selected.</em></p><p><strong><img src="http://images.devshed.com/da/stories/Adobe%20GoLive%20CS/mini-09fig09.jpg" border="0" alt="" hspace="0" align="baseline" /></strong></p><p><strong>Figure 9.9</strong> <em>The Inspector palette attributes with a file selected.</em></p><p><span style="color: #800000;"><strong>Using Adobe GoLive CS, Part 1 &#8211; The Toolbar</strong></span></p><p>If GoLive has an Object palette where the sibling application&#8217;s toolbox resides, does it mean that GoLive is toolbox-less? Au contraire, mon ami! If you look closely at the toolbar at the top of your screen, you&#8217;ll see that what initially appears to be one toolbar is actually three toolbars docked together: the Main toolbar, the Document toolbar, and the Version Cue toolbar. You can turn one or all of the toolbars off via the Window menu, but you need to separate them first. Put your cursor over one of the dividers and it will turn into a white hand icon; now click and drag to detach a toolbar from its neighbors.</p><p>The Main toolbar is context-sensitive like  the Inspector palette. It will contain a different set of tools  depending on whether you are working on a page, a site, a layout grid,  and so on (see Figure 9.10).</p><p><strong><img src="http://images.devshed.com/da/stories/Adobe%20GoLive%20CS/mini-09fig10.jpg" border="0" alt="" hspace="0" align="baseline" /></strong></p><p><strong>Figure 9.10</strong> <em>The  Main toolbar helpfully switches its set of tools according to what you  are working on. Here are the two modes you&#8217;ll see the most.</em></p><p>As  we go through this chapter, we&#8217;ll learn how to use the Objects palette,  the toolbars, and the Inspector palette together to easily create  pages, place images and text on those pages, link them together to build  a Web site, and upload the whole caboodle to the <a href="http://www.devarticles.com/#" target="_blank">Web server<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a>.</p><p><strong>Understanding the Site Window</strong></p><p>The  site window is your best friend. Never work on individual pages without  first opening the site window if you want your site to be trouble free.  GoLive depends on the site window to do its heavy-duty link checking  and site management; so heed this simple rule of thumb and your job will  be significantly easier. Open a site now. Notice that the site window  is split into two panes, and that each pane has a series of tabs across  the top. There&#8217;s a good reason for that&#8230;keep reading.</p><p><strong>The Files Tab</strong></p><p>Click the Files tab on the left side of the site window. Any item that will ultimately end up on the Web <a href="http://www.devarticles.com/#" target="_blank">server<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a>,  such as HTML pages, images, QuickTime movies, PDFs, or external CSS or  JavaScript files, will be listed in the Files tab. This tab is a  reflection of the items that physically exist in the <tt>web-content</tt> folder of the site.</p><p>From  within the site window you can create new pages or folders, rename  pages or folders, or move any of them around just as you would in the  Mac&#8217;s Finder or in Windows Explorer. The difference between doing those  things on your desktop and doing them in the Site window is that when  you use the Site window all your links and references remain intact.  Promise me now that you will always work with your site window opened!</p><p><span style="color: #800000;"><strong><br /></strong></span></p></blockquote>]]></content:encoded><wfw:commentRss>http://web.bearsols.com/development-design/web-authoring/using-adobe-golive-cs-part-1-by-sams-publishing/feed</wfw:commentRss><slash:comments>0</slash:comments></item><item><title>Introducing Dreamweaver (By: Costas Hadjisotiriou)</title><link>http://web.bearsols.com/development-design/web-authoring/introducing-dreamweaver-by-costas-hadjisotiriou</link><comments>http://web.bearsols.com/development-design/web-authoring/introducing-dreamweaver-by-costas-hadjisotiriou#comments</comments><pubDate>Fri, 08 Oct 2010 08:40:03 +0000</pubDate><dc:creator>anhnl</dc:creator><category><![CDATA[Web Authoring]]></category><guid isPermaLink="false">http://web.bearsols.com/?p=3403</guid><description><![CDATA[Introducing DreamweaverGet familiar with the Dreamweaver workspace, its  document window, property inspector, common tab and ASP.NET tab and the  grouped panels. (This is chapter 1 from the book ASP.NET Web Development with Macromedia Dreamweaver MX 2004, by Costas Hadjisotiriou (with Rachel Andrew and Kevin Marshall published by Apress, 2004, ISBN: 1590593480.)In  this [...]]]></description><content:encoded><![CDATA[<p><span style="color: #800000;"><strong>Introducing Dreamweaver</strong></span></p><p>Get familiar with the Dreamweaver workspace, its  document window, property inspector, common tab and ASP.NET tab and the  grouped panels. (This is chapter 1 from the book <em>ASP.NET Web Development with Macromedia Dreamweaver MX 2004</em>, by Costas Hadjisotiriou (with Rachel Andrew and Kevin Marshall published by Apress, 2004, ISBN: 1590593480.)</p><p><a rel="nofollow" href="http://www.amazon.com/exec/obidos/ASIN/1590593480/develshedinc-20/102-8811971-6874557?dev-t=mason-wrapper%26camp=2025%26link_code=xm2"><img src="http://images.devshed.com/da/stories/ASP%20dot%20net%20Web%20Development/hadjcover.jpg" border="0" alt="ASP dot net" hspace="5" vspace="2" align="left" /></a>In  this chapter, we give you a brief overview of the Dreamweaver MX and  Dreamweaver MX 2004 workspace including the locations of all the common  elements in the program. By the end of this chapter, you will be  familiar enough with the Dreamweaver workspace to work your way though  this book’s subsequent chapters.</p><p>The Dreamweaver workspace  has four main sections (See Figure 1-1) although your display layout  may vary slightly because Dreamweaver allows you to rearrange all the  elements by dragging and dropping the panels within the workspace.</p><p>- Document window (main area)<br />- Insert bar (across top)<br />- Property inspector (on bottom)<br />- Grouped panels (on left)</p><p><img src="http://images.devshed.com/da/stories/ASP%20dot%20net%20Web%20Development/ch.1fig1.jpg" border="0" alt="asp" hspace="0" align="baseline" /></p><p><em>Figure 1-1. The Dreamweaver workspace </em></p><p><strong>Document Window</strong></p><p>The  document window is the design surface of your document; it is where all  the elements that make up your document are inserted. The document  window can display the content of your document in three possible views.</p><ul type="disc"><li><strong>Design view:</strong> The document window displays your document as it will look when displayed in a <a href="http://www.devarticles.com/#" target="_blank">web browser<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a>.</li><li><strong>Code view:</strong> The document window displays the <a href="http://www.devarticles.com/#" target="_blank">HTML<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a> markup and any server-side code that makes up your document.</li><li><strong>Split view:</strong> The document window displays Design view and Code view as two panes  with a horizontal resize handle to adjust the size of each pane, as  shown in Figure 1-2. This is the most useful view when developing  ASP.NET applications.</li></ul><p>Another useful feature of  the document window is Live Data view, which simulates roughly how the  page will look when previewed in a web browser. Although not an exact  representation of what a browser will render, Live Data view will show  an approximate representation within the Dreamweaver document window.</p><p><img src="http://images.devshed.com/da/stories/ASP%20dot%20net%20Web%20Development/ch.1fig2.jpg" border="0" alt="asp" hspace="0" align="baseline" /></p><p><em>Figure 1-2. Split view </em></p><p><span style="color: #800000;"><strong>Introducing Dreamweaver &#8211; Property Inspector</strong></span></p><p>The Property inspector is a very handy tool that allows you to change attributes on most <a href="http://www.devarticles.com/#" target="_blank">HTML<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a> tags in a very efficient manner. It constantly changes its contents to  suit the currently selected element in your document. If you select a  block of text, the Property inspector will display fields and buttons  that allow you to change the attributes of the selected element such as  color, font, and other attributes, as shown in Figure 1-3. If you select  a table, the Property inspector will display fields that directly  relate to the <span>&lt;table&gt;</span> tag such as cell spacing and cell padding, as shown in Figure 1-4. You  will quickly discover that the Property inspector is probably the most  useful element of the Dreamweaver interface.</p><p><img src="http://images.devshed.com/da/stories/ASP%20dot%20net%20Web%20Development/ch.1fig3.jpg" border="0" alt="asp" hspace="0" align="baseline" /></p><p><em>Figure 1-3. The Property inspector when text is selected </em></p><p><em> </em></p><p><img src="http://images.devshed.com/da/stories/ASP%20dot%20net%20Web%20Development/ch.1fig4.jpg" border="0" alt="asp" hspace="0" align="baseline" /></p><p><em>Figure 1-4. The Property inspector when a table is selected </em></p><p><strong>Insert Bar</strong></p><p>The  Insert bar is used to insert elements into your document. It contains  categorized tabs, each containing a collection of icons relevant to the  tab’s category. By positioning the mouse pointer at a specific location  on the document’s design surface and clicking an icon in the Insert bar,  the associated element can be easily inserted into the document at that  location. <em>The Common Tab </em></p><p>The Common tab of the Insert bar (shown in Figure 1-5) contains icons that can be used to insert many commonly used elements.</p><p><img src="http://images.devshed.com/da/stories/ASP%20dot%20net%20Web%20Development/ch.1fig5.jpg" border="0" alt="asp" hspace="0" align="baseline" /></p><p><em>Figure 1-5. The Insert bar: Common tab </em></p><p>Icons from left to right are:</p><ul><li><strong>Hyperlink:</strong> Inserts a link to another page.</li><li><strong>Email Link:</strong> Inserts a mailto: link.</li><li><strong>Named Anchor:</strong> Inserts an anchor link.</li><li><strong>Insert Table:</strong> Inserts an HTML table <span>&lt;table&gt;</span> tag.</li><li><strong>Draw Layer:</strong> Allows you to draw a layer on the document surface. The end result is an absolutely positioned <span>&lt;div&gt;</span> tag with the width and height corresponding to what you drew.</li><li><strong>Image:</strong> Inserts an image <span>&lt;img&gt;</span> tag.</li><li><strong>Image Placeholder:</strong> Inserts a blank image.</li><li><strong>Fireworks HTML:</strong> Inserts HTML from a page created with Macromedia Fireworks.</li><li><strong>Flash:</strong> Allows you to insert Flash elements into a web page.</li><li><strong>Rollover Image:</strong> Inserts the code to create an image that changes when the mouse pointer moves over it.</li><li><strong>Navigation Bar:</strong> Inserts a navigation menu.</li><li><strong>Horizontal Rule:</strong> Inserts an <span>&lt;hr&gt;</span> tag.</li><li><strong>Date:</strong> Inserts the current date.</li><li><strong>Tabular Data:</strong> Inserts tabular data from external files.</li><li><strong>Comments:</strong> Inserts an HTML comment.</li><li><strong>Tag Chooser:</strong> Opens the Tag Chooser to allow selection of tags not present in the Insert bar.</li></ul><p><em>The ASP.NET Tab</em></p><p>The  ASP.NET tab of the Insert bar (shown in Figure 1-6) contains icons that  can be used to insert many commonly used ASP.NET elements.</p><p><img src="http://images.devshed.com/da/stories/ASP%20dot%20net%20Web%20Development/ch.1fig6.jpg" border="0" alt="asp" hspace="0" align="baseline" /></p><p><em>Figure 1-6. The Insert bar: ASP.NET tab </em></p><p>Icons from left to right are:</p><ul><li><strong>Register Custom Tag:</strong> Inserts a <span>Register TagPrefix</span> line</li><li><strong>Import Namespace:</strong> Inserts an<span> Import Namespace</span> line</li><li><strong>Trimmed Form Element:</strong> Inserts code for a trimmed <span>Form</span> element</li><li><strong>Trimmed QueryString Element:</strong> Inserts code for a trimmed <span>QueryString</span> element</li><li><strong>Runat Server:</strong> Inserts <span>runat=&#8221;<a href="http://www.devarticles.com/#" target="_blank">server<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a>&#8220;</span></li><li><strong>Bound Data:</strong> Inserts Bound Data tags (<span>&lt;%# %&gt;</span>)</li><li><strong>Page_Load:</strong> Inserts code for the <span>Page_Load</span> procedure</li><li><strong>Button:</strong> Inserts HTML from a page created with Macromedia Fireworks</li><li><strong>asp:CheckBox:</strong> Inserts an <span>&lt;asp:CheckBox&gt;</span> tag</li><li><strong>asp:CheckBoxList:</strong> Inserts an <span>&lt;asp:CheckBoxList&gt;</span> tag</li><li><strong>asp:DropDownList:</strong> Inserts an <span>&lt;asp:DropDownList&gt;</span> tag</li><li><strong>asp:ImageButton:</strong> Inserts an <span>&lt;asp:ImageButton&gt;</span> tag</li><li><strong>asp:Label:</strong> Inserts an <span>&lt;asp:Label&gt;</span> tag</li><li><strong>asp:ListBox:</strong> Inserts an <span>&lt;asp:ListBox&gt;</span> tag</li><li><strong>asp:RadioButton:</strong> Inserts an <span>&lt;asp:RadioButton&gt;</span> tag</li><li><strong>asp:RadioButtonList:</strong> Inserts an <span>&lt;asp:RadioButtonList&gt;</span> tag</li><li><strong>asp:TextBox:</strong> Inserts an <span>&lt;asp:TextBox&gt;</span> tag</li><li><strong>More Tags:</strong> Opens the Tag Chooser to allow selection of tags not present inthe Insert bar</li></ul><p><span style="color: #800000;"><strong>Introducing Dreamweaver &#8211; Grouped Panels</strong></span></p><p>The grouped panels contain many different panels  categorized for specific tasks. The following list of panel groups  outlines some of the commonly used panels for working on an ASP.NET  application. If you can’t see any of the grouped panels, display them by  selecting the panels you want to see from the Windows menu.</p><ul type="disc"><li><strong>Design:</strong> This panel contains tabs to manage <a href="http://www.devarticles.com/#" target="_blank">CSS<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a> Styles. It’s worth noting that the HTML Styles tab has been removed in Dreamweaver MX 2004.</li><li><strong>Application:</strong> This panel is where most of the ASP.NET functionality is located. You can define database connections and insert <a href="http://www.devarticles.com/#" target="_blank">server<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a> behaviors from this panel.</li><li><strong>Files:</strong> This panel is where all the files that make up your application are  managed. You can create, organize, and delete files using this panel; it  also has built-in functionality for managing the files on a remote  server as well as publishing and synchronizing local and remote files.</li></ul><p>Figure 1-7 shows the Files panel with the contents of the case study application from Chapter 11.</p><p><img src="http://images.devshed.com/da/stories/ASP%20dot%20net%20Web%20Development/ch.1fig7.jpg" border="0" alt="asp" hspace="0" align="baseline" /></p><p><em>Figure 1-7. The Files panel </em></p><p>Figure 1-8 shows the Application panel’s Databases tab containing a defined <a href="http://www.devarticles.com/#" target="_blank">database<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a> connection.</p><p><img src="http://images.devshed.com/da/stories/ASP%20dot%20net%20Web%20Development/ch.1fig8.jpg" border="0" alt="asp" hspace="0" align="baseline" /></p><p><em>Figure 1-8. The Application panel: Databases tab </em></p><p>Figure 1-9 shows the Application panel’s Bindings tab containing the field list for a dataset.</p><p><img src="http://images.devshed.com/da/stories/ASP%20dot%20net%20Web%20Development/ch.1fig9.jpg" border="0" alt="asp" hspace="0" align="baseline" /></p><p><em>Figure 1-9. The Application panel: Bindings tab </em></p><p>Figure 1-10 shows the Application panel’s Server Behaviors tab containing some server behaviors.</p><p><img src="http://images.devshed.com/da/stories/ASP%20dot%20net%20Web%20Development/ch.1fig10.jpg" border="0" alt="asp" hspace="0" align="baseline" /></p><p><em>Figure 1-10. The Application panel: Server Behaviors tab </em></p><p><span style="color: #800000;"><strong>Introducing Dreamweaver &#8211; Creating a New Page</strong></span></p><p>To create a new ASP.NET page in Dreamweaver MX and MX 2004, select File -&gt; New, as shown in Figure 1-11.</p><p><img src="http://images.devshed.com/da/stories/ASP%20dot%20net%20Web%20Development/ch.1fig11.jpg" border="0" alt="asp" hspace="0" align="baseline" /></p><p><em>Figure 1-11. The File menu </em></p><p>Upon  selecting this menu option, the New Document dialog box will appear. To  create an ASP.NET VB page, select the options shown in Figure 1-12.</p><p><img src="http://images.devshed.com/da/stories/ASP%20dot%20net%20Web%20Development/ch.1fig12.jpg" border="0" alt="asp" hspace="0" align="baseline" /></p><p><em>Figure 1-12. The New Document dialog box </em></p><p>You  can also create a new page simply by right-clicking the Site panel and  selecting New File from the context menu, as shown in Figure 1-13.</p><p><img src="http://images.devshed.com/da/stories/ASP%20dot%20net%20Web%20Development/ch.1fig13.jpg" border="0" alt="asp" hspace="0" align="baseline" /></p><p><em>Figure 1-13. Creating a file using the Site context menu </em></p><h2><span style="font-size: x-small;">Summary </span></h2><p>This  chapter gave you a brief introduction to the workspace in Dreamweaver  MX and Dreamweaver MX 2004. You should now be familiar enough with the  interface to work through the exercises in this book.</p><p><span style="color: #800000;"><strong><br /></strong></span></p><p><span style="color: #800000;"><strong><br /></strong></span></p><p><span style="color: #800000;"><strong><br /></strong></span></p><p><span style="color: #800000;"><strong><br /></strong></span></p>]]></content:encoded><wfw:commentRss>http://web.bearsols.com/development-design/web-authoring/introducing-dreamweaver-by-costas-hadjisotiriou/feed</wfw:commentRss><slash:comments>0</slash:comments></item><item><title>Dreamweaver MX 2004 Extensions (By: Apress Publishing)</title><link>http://web.bearsols.com/development-design/web-authoring/dreamweaver-mx-2004-extensions-by-apress-publishing</link><comments>http://web.bearsols.com/development-design/web-authoring/dreamweaver-mx-2004-extensions-by-apress-publishing#comments</comments><pubDate>Fri, 08 Oct 2010 08:32:47 +0000</pubDate><dc:creator>anhnl</dc:creator><category><![CDATA[Web Authoring]]></category><guid isPermaLink="false">http://web.bearsols.com/?p=3402</guid><description><![CDATA[Dreamweaver MX 2004 ExtensionsMost of the core program of Dreamweaver is built using the same API provided to developers for building extensions, making it easier to  find the functionality you need to start developing extensions. Read in  this chapter about the advantages of the Macromedia Extension Manager,  see the popular Yaromat Check Form extension, and [...]]]></description><content:encoded><![CDATA[<p><span style="color: #800000;"><strong>Dreamweaver MX 2004 Extensions</strong></span></p><p>Most of the core program of Dreamweaver is built using the same <a href="http://www.devarticles.com/#" target="_blank">API<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a> provided to developers for building extensions, making it easier to  find the functionality you need to start developing extensions. Read in  this chapter about the advantages of the Macromedia Extension Manager,  see the popular Yaromat Check Form extension, and the Massimocorner CF  Upload extension, and learn how to use the Dreamweaver Server Behavior  Builder to build a CFML form mailer. (<em>ColdFusion Web Development with Macromedia Dreamweaver MX 2004</em>, by Jen and Peter deHaan et al., Apress, 2004, ISBN: 1-59059-237-9.)</p><p><strong><a rel="nofollow" href="http://www.amazon.com/exec/obidos/ASIN/1590592379/develshedinc-20/104-9100181-4527114?%5Fencoding=UTF8&amp;camp=1789&amp;link%5Fcode=xm2"><img src="http://images.devshed.com/da/stories/coldfusion/dehaan%20cover1.jpg" border="0" alt="dehaan" hspace="5" vspace="2" align="left" /></a>Introduction</strong></p><p>One  of the main reasons Dreamweaver MX 2004 has been so successful is  undoubtedly its extensibility: its potential to be customized as  required. Thanks to the efforts of some early Dreamweaver adopters—who  have spent a lot of time digging into its program folders to find out  ways to improve the application—the number of extensions available for  Dreamweaver has reached a startling amount. Macromedia has always kept a  close eye on this phenomenon and welcomed it with open arms, offering  more and more tools and features to facilitate the development,  distribution, and consumption of these extensions, as well as publishing  numerous extensions in the form of Dev Net Resource Kits.</p><p>What distinguishes Dreamweaver extensibility from that of other <a href="http://www.devarticles.com/#" target="_blank">web development<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a> tools is that most of the core program itself is built using the same  API provided to developers for building extensions. Therefore, you don’t  need to go far to find the functionality necessary for you to start  developing extensions, and to gain insight into building your own  functionality, you just need to have a look at how Dreamweaver’s core  functionality has been created. What you will discover is that much of  this great Dreamweaver functionality is built using familiar  technologies such as HTML, XML, or JavaScript.</p><p>In this chapter we will:</p><ul type="disc"><li>Look  at the Macromedia Extension Manager and how it is used it to install,  disable, and remove extensions, and package new extensions we have  written ready for distribution</li><li>Showcase a couple of the most popular extensions—the Yaromat Check Form extension, and the Massimocorner CF Upload extension</li><li>Learn how to use the Dreamweaver <a href="http://www.devarticles.com/#" target="_blank">Server<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a> Behavior Builder to build a CFML form mailer</li></ul><p><strong>Exploring Extensions </strong></p><p>An  extension is something that permits us to add functionality to an  application beyond its core out-of-the-box functionality. Extensions are  employed to further increase productivity and reduce time spent solving  problems during development by automating repetitive tasks or adding  functionality to the base program. In Dreamweaver, extensions are  nothing more than additional objects, behaviors, commands and the like  added to the existing product.</p><p>To facilitate their distribution  and installation, Macromedia Extensions are usually made available as  Macromedia Extension Package (MXP) files (similar to zip archives) that  contain all the files necessary to install an extension. These files  contain Macromedia Extension Installation (MXI) files, which we show you  how to create at the end of this chapter.</p><p><span style="color: #800000;"><strong>Dreamweaver MX 2004 Extensions &#8211; Managing Extensions with the Macromedia Extension Manager</strong></span></p><p>Dreamweaver is not the only product that Macromedia made easily extensible. Flash and Fireworks can take advantage of custom extensions as well. For this reason, instead of enabling each one of these applications to handle the installation and packaging of extensions individually, Macromedia developed a program called Macromedia Extension Manager, which serves extensions to all of them, and presents other useful features.</p><p>NOTE Although Dreamweaver, Flash, and Fireworks are not the only Macromedia products that can be extended, they are the MX Studio products that take advantage of the Extension Manager. Programs such as Director and Freehand can be extended using extensions called Xtras. For more information on these, see http://www.macromedia.com/software/xtras/ .</p><p>The Extension Manager has reached version 1.6 and is able to manage extensions for Dreamweaver 4, Dreamweaver MX, Dreamweaver MX 2004, UltraDev 4, Fireworks MX, Flash 5, Flash MX, and Flash MX 2004. Extension Manager is usually installed by default with Dreamweaver or any other of the previously mentioned software packages, but it can also be downloaded for free from the Macromedia web site at http://www.macromedia.com/exchange/em_download/.</p><p>TIP Though Dreamweaver does install the Extension Manager by default, it is always worth visiting the Macromedia Exchange to check if a new version of the Extension Manager is available. If you create extensions using version 1.5 or above, developers who want to install the extension will also have to download the new version of the Extension Manager if it is not already installed on their machine.</p><p>When launched, the Extension Manager presents  us with a list of installed extensions, as shown in Figure 9-1. Please  be aware that if you are working on an operating system that allows  multiple user configurations (such as Windows 2000, Windows XP and <a href="http://www.devarticles.com/#" target="_blank">Mac OS X<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a>),  you will be able to view only the extensions installed in the current  user’s account and those installed by the system administrator.</p><p><strong><img src="http://images.devshed.com/da/stories/pic1.jpg" border="0" alt="" hspace="0" align="baseline" /><br />Figure 9-1.</strong><em> The Macromedia Extension Manager </em></p><p>Extensions  can be installed by choosing File -&gt; Install Extension, clicking on  the Install New Extension button (the icon in the top left of Figure  9-1), or simply by double-clicking the MXP file.</p><p>Although the  Extension Manager permits it, you are strongly discouraged from  installing an extension into a version of the application other than  what it was intended for (for example, installing a Dreamweaver 4  extension into Dreamweaver) unless you test the extension thoroughly  before using it. You may have compatibility problems if you don’t heed  this advice.</p><p>Once an extension has been installed, it will be  displayed along with the others in the Extension Manager. Extensions  that are no longer needed can be disabled or removed. When you have a  large number of extensions installed, this can affect Dreamweaver’s  performance, so it is a good idea to disable extensions that you are not  currently using. To disable an extension, just uncheck its checkbox in  the On/Off column, or select the extension and press the spacebar. To  enable it, simply reverse the process.</p><p>If you would like to  permanently remove an extension, you first must select it, then either  select File -&gt; Remove Extension, or click the Remove Extension button  (the trash can icon).</p><p>In addition to installing new extensions,  the Extension Manager enables us to import them from other instances of  Dreamweaver present on a local network or disk. This feature is very  useful, for example, if you are working in a team and each member needs  to use certain extensions to increase productivity. Another possible  scenario is when upgrading to a newer version of Dreamweaver and you  want to import all your previously installed extensions in a single  operation (although, as stated before, when moving extensions between  different product versions, it is be better to install and test each  extension singularly to avoid possible compatibility issues).</p><p>To  import extensions, first select the product from the drop-down menu on  the main interface. Next, choose File -&gt; Import Extensions, and the  Select Product dialog box will appear, as shown in Figure 9-2. Choose  the application where the extensions you want to import are installed.</p><p><strong><img src="http://images.devshed.com/da/stories/coldfusion/pic2.jpg" border="0" alt="" hspace="0" align="baseline" /><br />Figure 9-2.</strong><em> The Select Product dialog box </em></p><p>Click  OK, and the Import Extensions dialog box should appear, as shown in  Figure 9-3. From here choose the extensions you want to import, enabling  them in the Import column. Once you have chosen, click the Import  button to import the extensions.</p><p><strong><img src="http://images.devshed.com/da/stories/coldfusion/pic3.jpg" border="0" alt="" hspace="0" align="baseline" /><br />Figure 9-3.</strong><em> The Import Extensions dialog box </em></p><p>The  Extension Manager also contains functionality to allow us to package  the extensions we write and submit them to the Macromedia Exchange (for  more on packaging extensions, see the “Distributing Server Behavior”  section later on). The Macromedia Exchange is a great online resource  where you can download extensions and upload your own.</p><p>To go to  the exchange, either click on the Go To Macromedia Exchange button (or  choose File -&gt; Go To Macromedia Exchange) in the Extension Manager,  or type the following URL into a browser: <a rel="nofollow" href="http://www.macromedia.com/exchange/">http://www.macromedia.com/exchange/</a>.</p><p><em>Extensions Online Resources </em></p><p>Without  doubt, the Macromedia Exchange is the biggest extensions resource  available on the Web; however, it isn’t the only one. Each day, more and  more extensions for Dreamweaver and other Macromedia products are  created or updated by a number of third-party developers. It may happen,  for example, that more recent or exclusive versions of extensions  published on the Macromedia Exchange have been made available by their  developers only on their personal web sites.</p><p>Many of these  developers are well known and respected “extensionologists”— developers  who have been creating and distributing extensions since the early days  of Dreamweaver. To list all their web sites would take up more space  than we have available, but you will find a useful list of the better  extension sites to visit at <a rel="nofollow" href="http://www.dwfaq.com/Resources/Extensions/default.asp">http://www.dwfaq.com/Resources/Extensions/default.asp</a>.</p><p>In the sections that follow, we showcase two of the best and most popular extensions available for free over the Internet:</p><ul type="disc"><li>Yaromat  Check Form adds a wealth of invaluable form validation functionality to  Dreamweaver—something that the core product was considered slightly  lacking in.</li><li>Massimocorner CF Upload helps you develop ColdFusion file uploads really quickly by writing all the</li></ul><p><span style="color: #800000;"><strong>Dreamweaver MX 2004 Extensions &#8211; Yaromat Check Form</strong></span></p><p>Jaro von Flocken’s Check Form behavior for form field validation is definitely an extension that should be part of your developer toolbox. The latest version of Check Form (version 4.66.0) has been selected by Macromedia as one of the top three extensions currently available for Dreamweaver:</p><p>http://www.macromedia.com/software/dreamweaver/special/extensions</p><p>You can download Check Form for free from the previous link, and Jaro’s web site at http://www.yaromat.com (it is easy to navigate to).</p><p>As we learned in previous chapters, client-side form validation using JavaScript is very useful to check for data consistency before submitting it to the server.</p><p>TIP As stated in Chapter 5, be aware that users can disable JavaScript in their browsers. Therefore, it is always good practice to combine client-side and server-side validation.</p><p>Dreamweaver ships with a behavior called Validate Form, which offers basic form field validation. And, as we described earlier in the book, ColdFusion has some useful built-in form validation facilities in its &lt;cfform&gt; (and associated) tags.</p><p>Nevertheless, neither of these client-side validation options offers the same flexibility and amount of features as Check Form provides. The Validate Form behavior, for example, doesn’t present any kind of control for date and time format validation, doesn’t validate anything but text fields, and doesn’t allow the customization of the error message. Forms created with &lt;cfform&gt; also have some problems: even if correctly rendered in Design View, they won’t be recognized by Dreamweaver as valid form instances, with the result that you won’t be able to apply behaviors or server behaviors to them.</p><p>After you install it, the Check Form extension is available from the Behaviors panel (+ -&gt; Yaromat -&gt; Check Form), ready to be applied to the form you want to validate. The Check Form extension has many options for validating form elements, which vary according to the field type. The following is a list of controls Check Form lets you implement:</p><p>* Required: Checking this option denotes the field as required.</p><p>* Anything: The field can accept any value.</p><p>* Anumber from . . . to . . . : The field can accept any number within the specified range.</p><p>* E-Mail Address: This control checks if the value entered into the field constitutes a valid e-mail address.</p><p>* Date: Use this to choose from many date format validation options (including MySQL date format) to ensure valid database entries. It not only checks that the value is in a proper date format, but also if the date in fact exists (for example, the 30th of February 2003 is not a valid date).</p><p>* VTime: Use this to choose from many different time format validation options.</p><p>* This must be checked too: You select this to create dependency between radio buttons or checkboxes and other form fields. For example, you can make it so that a check box has to be checked before content in a text field is accepted.</p><p>* This must be the same: Extremely useful for password validation—this option allows you to specify that the contents of two different fields must be the same.</p><p>* Menu: This control lets you force the user to make a selection from a pop-up menu.</p><p>* Textarea: Here you can specify the minimum number of characters that the user must enter in a text area field.</p><p>* Checkbox: This control tests to see if a check box is checked, and lets you define a dependency between a checkbox and other form fields.</p><p>* Radiobutton: This control offers the same function as Checkbox, but for radio buttons.</p><p>* Error message: Us this to define a custom error message for every field that does not succeed the validation control.</p><p>To appreciate some of these features, let’s build a simple survey form.</p><p><span style="color: #800000;"><strong>Dreamweaver MX 2004 Extensions &#8211; Build a Simple Survey Form</strong></span></p><ol type="1"><li>In Dreamweaver, create a  new folder called Ch9 inside the cfbook folder. Create a new file  called checkform.cfm within this folder.</li><li>Open  checkform.cfm in Design View and insert a new form into it (click the  Form button in the Forms tab of the Insert bar). Name the newly created  form surveyForm (enter the name into the Properties panel, as shown in  Figure 9-4).<p><img src="http://images.devshed.com/da/stories/coldfusion/pic04.jpg" border="0" alt="" hspace="0" align="baseline" /><br /><strong>Figure 9-4.</strong><em> The Dreamweaver Properties panel, showing the details of the new form</p><p></em></li><li>Enter the text <strong>What is your preferred ColdFusion Book? </strong>into the form.</li><li>Now  click on the Radio Group button in the Forms tab of the Insert bar to  open the Radio Group dialog box. Fill it in as shown in Figure 9-5, and  click OK.<br /><strong><img src="http://images.devshed.com/da/stories/coldfusion/pic5.jpg" border="0" alt="" hspace="0" align="baseline" /><br />Figure 9-5.</strong><em> The Dreamweaver Radio Group dialog box </em></p><p>A radio button group should now be inserted on the page for you.</li><li>Below it, type the text <strong>If ‘Other’, please specify:</strong>.  Below this, insert a blank text field into the form by clicking on the  Text Field button in the Forms tab of the Insert panel. Name it  otherField.</li><li>Lastly, insert a Submit button by clicking on  the Button icon in the Forms tab of the Insert panel and save your file.  Your survey form is ready, and should look like the one shown in Figure  9-6.</li></ol><p><strong><img src="http://images.devshed.com/da/stories/coldfusion/pic6.jpg" border="0" alt="" hspace="0" align="baseline" /><br />Figure 9-6.</strong><em> Our finished survey form </em></p><p>Now it’s time to add JavaScript validation to the form by using Jaro’s Check Form behavior. Select the <span>&lt;form&gt;</span> tag (displayed as <span>&lt;form#surveyForm&gt;</span>) from the tag selector on the bottom bar of the document window (as shown in Figure 9-7) to select the entire form.</p><p><strong><img src="http://images.devshed.com/da/stories/coldfusion/pic7.jpg" border="0" alt="" hspace="0" align="baseline" /><br />Figure 9-7.</strong><em> The tag selector for the current page </em></p><p>From  the Behaviors panel, click on the + sign and choose Yaromat -&gt; Check  Form. The Check Form dialog box will open, as shown in Figure 9-8.</p><p><strong><img src="http://images.devshed.com/da/stories/coldfusion/pic8.jpg" border="0" alt="" hspace="0" align="baseline" /><br />Figure 9-8.</strong><em> The Yaromat Check Form dialog box, showing the choices available for our first radio button </em></p><p>Now, with surveyRadio[0] selected, click the radio button labeled “one of them” and enter <strong>Please choose a book </strong>in the <a href="http://www.devarticles.com/#" target="_blank">Error Message<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a> field.</p><p>Next,  select surveyRadio[1], click the radio button labeled “This must be  filled,” and choose otherField from the pop-up menu (which should be the  only field available in the pop-up menu anyway). Enter <strong>Please specify a title </strong>in the Error Message field and click OK.</p><p>Looking  at the Behaviors panel, you will notice that the Check Form behavior  has been applied to the onSubmit event of your form, which is usually  the best place to apply client-side form validation. If you now look in  Code View, you will see that JavaScript code has been added to your page  to validate form entries.</p><p>Test the form in a browser. Now if you  try to submit the form without making any choice, the “Please choose a  book” error message will be displayed, and if you choose the Others  radio button without specifying a title for it on the text field, the  “Please specify a title” error message will pop up. Fairly impressive,  isn’t it?</p><p><span style="color: #800000;"><strong>Dreamweaver MX 2004 Extensions &#8211; Massimocorner CF Upload</strong></span></p><p>Massimo Foti is surely one of the most prolific and recognized extension developers today. He won the title of “Best Extension Developer” during the Macromedia Best Extension Developer Awards in 2000. CF Upload is only one of the many Dreamweaver extensions committed to speeding up ColdFusion development in Dreamweaver (it was originally designed for Dreamweaver 4). You can download it for free from his personal web site at http://www.massimocorner.com. (On the main page, click on the Ultradev menu option, then the ColdFusion submenu option, and you should find it there.)</p><p>We have already seen how, when the action attribute of &lt;cfform&gt; is set to upload, it can be used to provide a mechanism for uploading files to the server. Massimo’s CF Upload server behavior further simplifies the process of creating a file upload form by completing the CFML code for you, and implementing arock-solid validation routine that checks for bad file types.</p><p>After you install it, CF Upload is available from the Server Behaviors panel when working with a ColdFusion site in Dreamweaver. To use the CF Upload server behavior, we first require a simple HTML postback form. A postback form (also known as a self-posting form) is nothing more than a form that submits information entered into it to itself. In other words, the same page is responsible for processing the data input and displaying the results.</p><p>The form must contain an input field with the  type attribute set to file. If CF Upload doesn’t find this, it will  promptly warn you to insert it. In addition, if you forget to include or  set the enctype attribute of the form tag to multipart/ form-data, or  the method attribute to post, a warning dialog will appear and ask if  you want CF Upload to fix these for you before inserting the CFML code  into the page, as shown in Figure 9-9.</p><p><strong><img src="http://images.devshed.com/da/stories/coldfusion/pic9.jpg" border="0" alt="" hspace="0" align="baseline" /><br /></strong><em>CF Upload warns you if everything is not in place prior to its use and offers to fix any problems it detects. </em></p><p>CF Upload has many options available that mainly replicate the properties of <span>&lt;cffile&gt;</span> when its action attribute is set to upload. In addition to these, you  can specify redirection to another page once the uploading process has  successfully completed, which comes in handy to give positive feedback  to users. The following is a list of settings available in CF Upload:</p><ul><li>Max  Size Allowed (KB): Use this to specify the maximum allowed size (in  kilobytes) of the file that has been uploaded. The validation process  for this feature of CF Upload is the result of a pretty effective  combination of CGI variables and HTTP header controls.</li><li>Form Field: You select the form and the file field to apply CF Upload to.</li><li>Destination Directory: Here you specify the pathname of the directory where the uploaded files will be stored on the server.</li><li>Handle Name Conflicts: Taking advantage of the nameConflict attribute of the <span>&lt;cffile&gt;</span> tag, this option lets you decide which action ColdFusion should take  when the name of a newly uploaded file conflicts with the name of a file  already stored on the server. Allowed options are: Make Unique Name,  Report an Error, and Overwrite.</li><li>After Uploading, Go To: Use this to redirect users to another page after a successful file upload.</li><li>Allowed Type: This series of checkboxes lets you choose which file MIME types are allowed for upload to the server.</li></ul><p>If something goes wrong during the upload process, CF Upload will display an <a href="http://www.devarticles.com/#" target="_blank">error message<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a> to the users. This message varies depending on the main cause of the problem.</p><p>In  Chapter 6 we described how to use Dreamweaver to create a CFML-driven  dynamic image gallery. In the following example, we show how you can  efficiently apply CF Upload to that example to create an upload form  more quickly.</p><p>The following example assumes you have gone through  “Creating aDynamic Image Gallery in ColdFusion” section in Chapter 6,  or at least have downloaded the code for it. We assume here that you  have the cfbook.mdb database and that it is successfully registered as a  data source. In addition to that, make sure your cfbook site root  folder contains the gallery directory and its images subfolder.</p><ol type="1"><li>In the Ch9 folder, create a new file and call it success.cfm. Enter <strong>Image has been successfully uploaded to the server.</strong>, then save the file and close it.</li><li>Now  create another file in the same location and call it cfupload.cfm.  Insert a blank form into the page in Design View, as in the last  example.</li><li>Next, insert a file field into the form by choosing Form Objects -&gt; File Field from the Insert menu.</li><li>Finally, insert a Submit button into the form, as before. Your upload form is ready, and should look like Figure 9-10.</li></ol><p><strong><img src="http://images.devshed.com/da/stories/coldfusion/pic10.jpg" border="0" alt="" hspace="0" align="baseline" /><br />Figure 9-10.</strong><em> Your form, ready to have CF Upload applied to it </em></p><p>We  will now proceed to apply the CF Upload server behavior to the form.  From the Server Behaviors panel, choose + -&gt; Massimocorner -&gt;  File -&gt; File Upload. You should be presented with the dialog box in  Figure 9-11.</p><p><strong><img src="http://images.devshed.com/da/stories/coldfusion/pic11.jpg" border="0" alt="" hspace="0" align="baseline" /><br />Figure 9-11.</strong><em> The CF Upload File Upload dialog box </em></p><p>In  the dialog box, increase the Max Size Allowed (KB) value from 30 to  100, leave the Form Field drop-down menu as it is, and set the  Destination Directory as gallery/images. Leave Make Unique Name as the  rule for the Handle Name Conflicts option, and make sure the only  allowed type for upload is Images.</p><p>The allowed values for the Handle Name Conflicts option originate from the nameConflict attribute of the ColdFusion <span>&lt;cffile&gt;</span> tag. For a complete description of the available actions, please  consult the ColdFusion CFML Reference documentation or refer to Chapters  3 and 5 of this book.</p><p>Because CF Upload works smoothly in  combination with standard server behaviors, we won’t redirect users to  another page now, but will first use the Insert Record server behavior  to add the value returned from CF Upload as an entry to our database.  Providing a URL in the After Uploading, Go To field at this point will  result in no data being entered into the database, so leave it empty and  click OK to exit this dialog box and apply the behavior.</p><p>Now  let’s finish off our page. Choose Server Behaviors -&gt; + -&gt; Insert  Record. The Insert Record dialog box will pop up, as shown in Figure  9-12.</p><p><strong><img src="http://images.devshed.com/da/stories/coldfusion/pic12.jpg" border="0" alt="" hspace="0" align="baseline" /><br />Figure 9-12.</strong><em> The Insert Record dialog box </em></p><p>In  this dialog box, select cfbook as the Data Source. From the Columns  box, select “‘ImageFullSrc’ Gets Value&#8230;”, and select FORM.file in the  Value pop-up menu. Finally, click on the Browse button, browse to the  success.cfm file, then click the OK button to close the dialog box and  apply the behavior.</p><p>Now test the page in a browser, and try to  upload images. If the image upload process and database insertion is  successful, you will be redirected to the success.cfm page; otherwise,  an error message will be displayed.</p><p>If the upload process is  successful, CF Upload will automatically set the value of the FORM  variable passed by the file field to the value of the FILE.ServerFile  variable, facilitating its use with other server behaviors.</p><p><span style="color: #800000;"><strong>Dreamweaver MX 2004 Extensions &#8211; Dreamweaver’s Server Behavior Builder</strong></span></p><p>After so much talk about extensions and how you can benefit from using ready-made ones, we now take a look at one of the main ways in which you can create your own: the Server Behavior Builder.</p><p>Over the course of this book we have seen how useful Dreamweaver server behaviors are, and how much time they can save you during web development. Well, now you can create your own: introduced in Dreamweaver UltraDev 4, The Server Behavior Builder enables you to turn code snippets into powerful server behaviors. The Server Behavior Builder automates the creation of all the necessary files that make up the server behaviors. They consist of an HTML file and two or more Extension Data Markup Language (EDML) files.</p><p>The HTML file contains all the needed scripts and all the elements of the interface that will allow the user to use the server behavior, whereas the EDML files (which are basically XML files) are mainly used by Dreamweaver to identify and interpret the various code blocks that comprise the server behavior.</p><p>To better understand the content of the EDML files, a short digression on how a server behavior works is required. As you should have noticed in previous chapters, server behaviors differ from regular behaviors in the way they can be applied to your HTML code. In fact, because server behaviors mainly comprise server-side code, they can be placed on any part of your source code, even around selected areas. Each single code block of a server behavior is called a participant and is made up of an EDML file, while the list of all the participants needed by a server behavior to work is called a participants group, and is represented by another EDML file.</p><p>When inserting a server behavior into a document, Dreamweaver needs to know where to insert each code block, what each code block looks like, and what data must be entered by the user or replaced at runtime. Each single participant EDML file stores its own information, and the participants group EDML file lists all the participants that make up the server behavior.<br />Creating a Generic CFML Form Mailer Server Behavior</p><p>Using the Dreamweaver Server Behavior Builder, you are now going to create a generic ColdFusion-driven Form Mailer. A Form Mailer is used to process and send all the fields of an HTML form to a specified address as an e-mail.</p><p>Before considering turning code into a server behavior, make sure it is bug free and fully tested. Inserting a buggy server behavior into your pages will cause all kinds of problems that will be difficult to debug. In addition to this, make sure that the code you want to be available as a server behavior is really suitable; if it doesn’t accept parameters or cannot be easily reused, it is not the right candidate for a server behavior. Code blocks that need no or few parameters to be entered should instead be turned into snippets, as we will see in the next chapter.</p><p><span style="color: #800000;"><strong>Dreamweaver MX 2004 Extensions &#8211; Build Server Behavior Code and Interface</strong></span></p><p>Building the Server Behavior Code</p><p>The following listing is the ColdFusion code we are going to turn into a server behavior (CFmailer.cfm):</p><p>&lt;cfif isdefined(&#8220;form.fieldnames&#8221;)&gt;<br />&lt;cfset mail_body = &#8220;&#8221;&gt;<br />&lt;cfset cr = Chr(13) &amp; Chr(10)&gt;<br />&lt;cfloop index=&#8221;form_element&#8221; list=&#8221;#form.fieldnames#&#8221;&gt;<br />&lt;!&#8212; Append each form element to message body &#8212;&gt;<br />&lt;cfset mail_body = mail_body &amp; form_element &amp; &#8220;: &#8221; &amp; Evaluate(form_element) &amp; cr&gt;<br />&lt;/cfloop&gt; &lt;cfmail to=&#8221;info@mysite.com&#8221; from=&#8221;myform@mysite.com&#8221; subject=&#8221;Contact Form&#8221;&gt;<br />#mail_body#<br />&lt;/cfmail&gt;<br />&lt;cfset mail_redirect=&#8221;success.cfm&#8221;&gt;<br />&lt;cfif mail_redirect NEQ &#8220;&#8221;&gt;<br />&lt;cflocation url=&#8221;#mail_redirect#&#8221;&gt;<br />&lt;/cfif&gt;<br />&lt;/cfif&gt;</p><p>The code starts by checking that the Form.Fieldnames variable exists. If so, it loops over each form field, adding their names and values to the message body (the mail_body variable), which will be sent as an e-mail by using the &lt;cfmail&gt; tag. After the message has been sent, the &lt;cflocation&gt; tag will stop the code execution and open a new page, as long as the mail_redirect variable is not empty.</p><p>For the sake of the example, when turning the preceding ColdFusion code into a server behavior, you will convert only the to and from attributes of the &lt;cfmail&gt; tag and the value of the mail_redirect variable into custom parameters, although it is possible to change other parts of the code, such as the subject attribute.</p><ol><li>Start by choosing + -&gt; New Server  Behavior from the Server Behavior panel. The New Server Behavior dialog  window should appear, as shown in Figure 9-13.<br /><strong><img src="http://images.devshed.com/da/stories/coldfusion/pic13.jpg" border="0" alt="" hspace="0" align="baseline" /><br />Figure 9-13.</strong><em> Specifying the Document Type and Name of your server behavior </em></p><p>Make sure ColdFusion is selected in the Document Type drop-down menu and enter <strong>CF Form Mailer </strong>in the Name field.</p><p>Checking  the “Copy existing server behavior” option will enable the “Behavior to  copy” drop-down menu, which shows a list of all the avail able server  behaviors we can copy from. You don’t want to copy a server behavior in  this case, so leave it unchecked.</li><li>Now click OK, and the main dialog window of the Server Behavior Builder will appear, which should look like Figure 9-14.<p><img src="http://images.devshed.com/da/stories/coldfusion/pic14.jpg" border="0" alt="" hspace="0" align="baseline" /><br /><strong>Figure 9-14.</strong><em> The main Server Behavior Builder dialog box</p><p></em></li><li>Click on the + sign to add a new code block. Dreamweaver will name it CF Form Mailer_block1. Click OK to accept this name.</li><li>Insert the CFML Form Mailer code (CFmailer.cfm) into the Code Block field.</li><li>Now it’s time to convert part of the code into some custom parameters. You want to be able to define the values of the <span>&lt;cfmail&gt;</span> tag’s first two attributes and to choose which URL to redirect users to after they submit the form. Highlight the <span>&lt;cfmail&gt;</span> tag’s first attribute value (info@mysite.com) and click on the Insert  Parameter in Code Block button. The dialog box in Figure 9-15 appears.<br /><strong><img src="http://images.devshed.com/da/stories/coldfusion/pic15.jpg" border="0" alt="" hspace="0" align="baseline" /><br />Figure 9-15.</strong><em> Inserting a parameter in the code block </em></p><p>Enter <strong>Send Form To </strong>in  the Parameter Name field and click OK. The chosen parameter name will  be inserted into the code block surrounded by @@ blocks, replacing the  info@mysite.com address.</li><li>Repeat step 5, this time replacing  myform@mysite.com with From, and replacing success.cfm (which is the  value of the mail_redirect attribute of the &lt;cfset&gt; tag) with <strong>Go To Page</strong>.</li><li>A  good place to insert the server behavior is at the top of the page  containing the form to be posted. For this reason, select Above the &lt;<a href="http://www.devarticles.com/#" target="_blank">html<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a>&gt;  Tag from the Insert Code pop-up menu in the Main Server Behavior  Builder dialog box, then choose The Beginning of the File from the  Relative Position menu.</li></ol><p>The Insert Code and Relative  Position menus are related. The values available for the latter  directly depend on the value chosen for the former. To learn more about  code block positioning, please consult the Positioning code blocks  section of the Using Dreamweaver documentation or the Participant EDML  files section of the Extending Dreamweaver documenation, both available  from Dreamweaver’s Help menu.</p><p>Now all we have left to do in this  dialog box is set some advanced options. Click on Advanced to display  the Server Behavior Builder’s advanced options.</p><p>Make sure the  Identifier checkbox is selected so that the server behavior will be  recognized by Dreamweaver and displayed on the Server Behaviors panel.  The Server Behavior Title field is where you define the name your server  behavior will appear under in the Server Behaviors panel, and the Code  Block pop-up menu defines which code block will be highlighted when the  server behavior is selected. Lastly, change the default [No Selection]  value with CF Form Mailer_block1 and click on Next.</p><p><em>Building the Server Behavior Interface </em></p><p>We  have covered the first step of making your server behavior. Next you  must specify an HTML interface that you will use to enter custom  parameter values into the server behavior. You don’t have to actually  build a GUI yourself; you just specify what you want to appear in it,  then Dreamweaver does most of the hard work.</p><ol><li>The dialog box shown in Figure 9-16 should now be present in Dreamweaver.<br /><strong><img src="http://images.devshed.com/da/stories/coldfusion/pic16.jpg" border="0" alt="" hspace="0" align="baseline" /><br />Figure 9-16.</strong><em> The dialog box that allows you to specify how the GUI (dialog box) for your server behavior will look </em></p><p>Select  the Go To Page parameter. A small down arrow will appear at the right  of its value in the Display As column. Click on the arrow to display all  the available interface controls for user input.</li><li>Because the Go To Page parameter defines which URL users are sent to after the form is posted, choose URL Text Field.</li><li>The  up and down arrows to the top-right corner of the main dialog change  the order in which the parameters appear on the final HTML interface.  Leave the Go To Page parameter selected and click on the down arrow to  move it to the bottom of the list. Click OK.</li></ol><p>The CF  Form Mailer server behavior should have been added the Server Behaviors  panel, and is ready to be applied to any page you choose. The main  dialog of your newly created server behavior should look like Figure  9-17. Try it out on a form of your own!</p><p><strong><img src="http://images.devshed.com/da/stories/coldfusion/pic17.jpg" border="0" alt="" hspace="0" align="baseline" /><br />Figure 9-17.</strong><em> Your new server behavior’s dialog box </em></p><p><em>What Files Compose the Server Behavior? </em></p><p>If  you now look into the ServerBehaviors/ColdFusion folder in your  Dreamweaver Configuration directory, you will find three new files that  have just been generated by the Server Behavior Builder.</p><p>The three new files are as follows:</p><ul type="disc"><li>CF  Form Mailer.edml: This file is the participants group EDML file for  your CF Form Mailer server behavior. If you open it with a <a href="http://www.devarticles.com/#" target="_blank">text editor<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a>,  you will see that it contains information about which version of  Dreamweaver created it, and the text that will appear in the Server  Behaviors panel after you apply the server behavior to a page. It also  contains a list of all the participant EDML files.</li><li>CF  Form Mailer_block1.edml: This file is a participant EDML file and  contains all the information needed by Dreamweaver to distinguish it as a  code block and to correctly apply it to files when the server behavior  is applied.</li><li>CF Form Mailer.htm: This is the interface of  the CF Form Mailer main dialog that appears when the server behavior is  called within Dreamweaver. Because it is simple HTML, you can edit it  to create a more satisfactory user interface if wished.</li><li><span style="color: #800000;"><strong>Dreamweaver MX 2004 Extensions &#8211; Distributing Server Behavior</strong></span><p>To distribute your new server behavior, you can use the Extension Manager, which allows you to create an MXP and submit it to the Macromedia Exchange (http://www.macromedia.com/exchange).</p><p>For the Extension Manager to be able to package your server behavior, you must prepare a Macromedia Extension Installation (MXI) file. These files are basically XML files used to document the name of the extension, its version number and type, and the content of the package. In addition to this, the MXI file tells the Macromedia Extension Manager how to install the extension, and tells users how to access and use it. The Sample subfolder of the Extension Manager application directory contains several MXI example files you can use as starting templates to create your own installation file. In addition to this, a complete reference about MXI files is available on the Macromedia web site at http://www.macromedia.com/go/em_file_format/.</p><p>We will now guide you through the creation of a simple MXI file you can use to package your CF Form Mailer server behavior for distribution:</p><p>1. Start by creating a folder on your desktop (or wherever you prefer on your local machine) and name it CFBook Form Mailer. This is where you will copy all the files that will form the extension package.<br />2. Copy the three files created by the Server Behavior Builder for your CF Form Mailer extension into this folder: CF Form Mailer.htm, CF Form Mailer.edml, and CF Form Mailer_block1.edml. They should be in the Configuration\ServerBehaviors\ColdFusion subdirectory of your Dreamweaver install directory.<br />3.</p><p>Open your text editor of choice. Now you start to build the MXI file. First add the following tag to the file, which provides data about the extension to the Extension Manager, including name, version, and type, and whether a restart of Dreamweaver is required after installation:</p><div class="code"> &lt;macromedia-extension name="CF Form Mailer"<br />version="1.0"<br />type="serverBehavior"<br />requires-restart="false"&gt;<br />&lt;/macromedia-extension&gt;<br />4.</p><p>Next you specify the products the extension has been built for, which in your case is Dreamweaver only. Add the following lines inside the &lt;macromedia-extension&gt; tag (note that Dreamweaver corresponds to version 7 of the application):</p><p>&lt;products&gt;<br />&lt;product name="Dreamweaver" version="6" required="true" /&gt;<br />&lt;/products&gt;<br />5.</p><p>Other required information is as follows: the name of the extension’s author (contained in the &lt;author&gt; tag name attribute), a short explanation of its use (in the &lt;description&gt; tag), and instructions on how to access it from inside the application (in the &lt;UI-access&gt; tag).</p><p>The last two tags must contain a CDATA section and use a VARCHAR data type with a limit of 2,000 characters. In addition to this, you can use the &lt;br /&gt; HTML tag and nonbreaking spaces (specified by the   escape code) to format the text inside those tags. Add the following lines directly below the &lt;/products&gt; tag:</p><p>&lt;author name="CFBook"&gt;&lt;/author&gt;</p><p>&lt;description&gt;<br />&lt;![CDATA[<br />Generic ColdFusion Form Mailer<br />]]&gt;<br />&lt;/description&gt;<br />&lt;UI-Access&gt;<br />&lt;![CDATA[<br />You can run this Server Behavior by choosing:&lt;br /&gt;<br />Server Behaviors &gt; CF Form Mailer<br />]]&gt;<br />&lt;/UI-Access&gt;<br />6.</p><p>Now it’s time to provide the list of files that must be installed in the application as part of the extension. This is done using the &lt;files&gt; tag, which contains &lt;file&gt; child tags—one for each file installed.</p><p>The &lt;file&gt; tag has two attributes: source and destination. The first attribute contains the name of the file to be installed, and the second contains the path to the destination folder. Add the following lines to your code, just below the &lt;UI-Access&gt; tag:</p><p>&lt;files&gt;<br />&lt;file source="CF Form Mailer.htm"<br />destination="$Dreamweaver/Configuration/ServerBehaviors<br />/ColdFusion/"&gt;<br />&lt;/file&gt;<br />&lt;file source="CF Form Mailer.edml"<br />destination="$Dreamweaver/Configuration/ServerBehaviors<br />/ColdFusion/ "&gt;<br />&lt;/file&gt;<br />&lt;file source="CF Form Mailer_block1.edml"<br />destination="$Dreamweaver/Configuration/ServerBehaviors<br />/ColdFusion/ "&gt;<br />&lt;/file&gt;<br />&lt;/files&gt; </div><p>Our MXI file should now be ready for packaging—save it as cf_form_mailer.mxi in the same location as your .htm and .edml files (check that it is correct by comparing it to the cf_form_mailer.mxi file in the code download for this chapter, available at http://www.apress.com).</p><p>Now double-click your cf_form_mailer.mxi file. The Macromedia Extension Manager will now launch and present you with the dialog box shown in Figure 9-18.</p><p>Figure 9-18. The Extension Manager prompts you to choose an extension to package when you click on an MXI file.</p><p>Click the OK button, and the Extension Manager will propose a name for the MXP file. Accept the default offered by clicking OK again, and the extension package will be created.</p><p>Our CF Form Mailer extension can now be installed in Dreamweaver. Always remember to test carefully each new extension you package before distributing it. Macromedia Exchange provides a set of useful extension testing guidelines at http://www.macromedia.com/exchange/.<br />Summary</p><p>In this chapter you have learned about several aspects of Dreamweaver extensibility. You now know:</p><p>* What a Macromedia Extension is</p><p>* What the Macromedia Extension Manager is and where to get it</p><p>* How to install, remove, and manage extensions by using the Macromedia Extension Manager</p><p>* Where to download additional extensions to add to Dreamweaver</p><p>* How to use Jaro von Flocken’s Check Form behavior</p><p>* How to use Massimo Foti’s CF Upload server behavior</p><p>* What the Server Behavior Builder is</p><p>* How to create custom server be haviors by using the Server Behavior Builder</p><p>Extensibility is one of Dreamweaver’s best features because it lets us easily customize our environment to better fit our development needs.</li></ul><p><span style="color: #800000;"><strong><br /></strong></span></p>]]></content:encoded><wfw:commentRss>http://web.bearsols.com/development-design/web-authoring/dreamweaver-mx-2004-extensions-by-apress-publishing/feed</wfw:commentRss><slash:comments>0</slash:comments></item><item><title>Rich Backgrounds for Logos and Menus (By: Clay Dowling)</title><link>http://web.bearsols.com/development-design/web-authoring/rich-backgrounds-for-logos-and-menus-by-clay-dowling</link><comments>http://web.bearsols.com/development-design/web-authoring/rich-backgrounds-for-logos-and-menus-by-clay-dowling#comments</comments><pubDate>Fri, 08 Oct 2010 08:20:47 +0000</pubDate><dc:creator>anhnl</dc:creator><category><![CDATA[Web Authoring]]></category><guid isPermaLink="false">http://web.bearsols.com/?p=3400</guid><description><![CDATA[Rich Backgrounds for Logos and MenusThe average Joe can give his site or application a little professional polish using photos he takes himself and a few simple design techniques. Rich banners and menu backgrounds are easy to design into your site and don&#8217;t require purchasing anything you don&#8217;t probably already have for your computer.As a [...]]]></description><content:encoded><![CDATA[<p><span style="color: #800000;"><strong>Rich Backgrounds for Logos and Menus</strong></span></p><p>The average Joe can give his site or application a little professional polish using photos he takes himself and a few simple design techniques. Rich banners and menu backgrounds are easy to design into your site and don&#8217;t require purchasing anything you don&#8217;t probably already have for your computer.</p><p>As a web application developer, I generally find that I&#8217;m responsible for not only the web application but the appearance of the public side of the site, even if the project theoretically has a designer. I developed these design skills as a defense against blocky, bland sites and applications that turn prospects into other people&#8217;s customers. If a programmer like me can learn these tricks, then nearly anyone can.</p><p>My basic technique is to start with a photograph for the background, perform some alterations to adapt it to my needs, then composite the altered background with foreground text and any foreground images I might want. I discuss the details of each step below.</p><p>Getting Images</p><p>I start with a background photograph. The reason is fairly simple: shooting a photograph is a matter of a few minutes, while drawing something suitable will take hours. The photograph will also look considerably better than anything I&#8217;m likely to draw.</p><p>I looked into using commercial photographs from art download sites, but I could never find anything that struck my fancy. What I turned to were photographs that I had taken myself. Because I had taken them, they all matched up with something that interested me. For your images, scrounge around in your snapshots, or if you&#8217;ve got a digital camera, find something remotely interesting looking and take a quick picture. Try to get several pictures to choose from, because what looks right at the time might not look right when you get back home.</p><p>The images that work best for backgrounds are going to be a matter of personal preference, but generally landscape images work the best. I&#8217;ve also had very good luck with photographing surfaces that had an interesting texture or pattern. If you&#8217;re trying to capture texture, lighting is key. The more closely parallel your main light source is to the surface that you&#8217;re photographing, the more the texture will be highlighted. The point is to cast shadows of the texture, because that&#8217;s what&#8217;s going to show up on camera.</p><p>The really important thing is not to spend too much time worrying about getting just the right picture. Professional graphic artists and art directors agonize about such things. That&#8217;s what they&#8217;re paid to do. You almost certainly have something better to be doing, like producing a website.</p><p>Framing</p><p>Here&#8217;s where you&#8217;re going to do exactly what the professionals do. Professionals only use the part of an image that interests them.  You&#8217;re going to crop this image to the right size, and use only the portion that is interesting and appropriate to your purpose.</p><p>When photographers are cropping a picture, they frequently block off bits they don&#8217;t want with pieces of paper. On the computer you can do the same thing by drawing your crop rectangle with your cropping tool, then dragging the frame around until you like the bit that it&#8217;s displaying. You may have to experiment with size a little bit, but you&#8217;ll come up with something appropriate.</p><p><span style="color: #800000;"><strong>Rich Backgrounds for Logos and Menus &#8211; Banners</strong></span></p><p>The best way to learn is by doing, so we&#8217;ll start off with an example site banner for a fictional MegaCorp.</p><p>The first step in creating this banner  involved selecting the background image. Unlike an art director, who  spends a lot of time hunting through stock images to find just the right  picture, I spent a little bit of time hunting through my snapshots for a  workable picture. That&#8217;s important to keep in mind: my resources are  limited, so I&#8217;ll work with what I have. I also spend a lot of time with  my digital camera and before that, a cheap film camera, taking pictures  of things that I thought looked interesting. None of these pictures are  professional grade; they&#8217;re just pictures that tried to capture what I  want looking for. In this example, I pulled out a snapshot from a trip  to Lake Michigan:</p><p><img src="http://images.devshed.com/da/stories/Rich%20Backgrounds%20for%20Logos%20and%20Menus/1.jpg" border="0" alt="Creating Backgrounds for Logos and Menus" hspace="0" align="baseline" /></p><p>Even  that image was slightly retouched. The image had color shifted over the  years, owing to cheap processing and questionable film handling on my  part. I used the GIMP&#8217;s automatic normalizing features to correct the  color, then did a little fine tuning with the image brightness to get  something that looked right. I also shrank the image to a workable size,  which helped to hide film grain and scanning artifacts.</p><p>Now that I  have my basic image, it&#8217;s time to crop it. For a banner I have a  desired size, in my case about 800 pixels across and 150 pixels high.  The size you choose will depend a lot on your design. 150 pixels seems  pretty high and will tend to dominate the page on smaller screens.  That&#8217;s perfectly fine though, since I want to convey the fact that  MegaCorp is a dominating power.  In this image it was fairly obvious to  me that the horizon was probably the most interesting part of the image  and the most appropriate to what I was trying to do. I did draw my  cropping rectangle to the size I wanted though and moved it around a  bit, playing with different sizes, to see what would work the best. The  final cropped image looked like this:</p><p><img src="http://images.devshed.com/da/stories/Rich%20Backgrounds%20for%20Logos%20and%20Menus/2.jpg" border="0" alt="Creating Backgrounds for Logos and Menus" hspace="0" align="baseline" /></p><p>Right  away I can see this particular part of the image has a strong color  bias toward the reds, giving a purple cast to the clouds. Since that may  be a pain in the tail later on, I make sure to keep the photograph as  the background, and the other items I&#8217;ll be adding will become separate  layers. If you aren&#8217;t accustomed to using layers in your images, now is  the time to start. They&#8217;re a major life saver when you are combining  several separate parts into a whole.</p><p>Now we need to add our text  to the banner. MegaCorp&#8217;s logo should be in a strong orange, the company  color. It also stands out nicely against the blue water. I chose a very  simple font to convey the company&#8217;s monolithic nature, and also to  improve readability. Because the large company name appears both above  and below the horizon, I also highlighted it with the GIMP&#8217;s Xach  Effect, which highlights a selection (in this case text) using both a  drop shadow and a white mask. For the company motto, &#8220;Looming on Your  Horizon,&#8221; I didn&#8217;t need to use any kind of highlighting effect because  the orange letters already stand out clearly on the blue background. The  results, after adding the text, look like this:</p><p><img src="http://images.devshed.com/da/stories/Rich%20Backgrounds%20for%20Logos%20and%20Menus/3.jpg" border="0" alt="Creating Backgrounds for Logos and Menus" hspace="0" align="baseline" /></p><p>This  looks pretty good, but after adding the orange text, I find the purple  clouds both annoying and distracting. This is where my earlier  insistence upon multiple layers pays off because I can work on just a  portion of the background layer. I pull out one of my favorite tricks  here: desaturation of all or part of an image. Desaturation removes all  of the color from an image and leaves only the information about light  and dark. That&#8217;s pretty much perfect for our sky here because your brain  tends to remember clouds as gray and white, and the gray sky behind  isn&#8217;t distracting to the eye.</p><p>The final banner looks like this:</p><p><img src="http://images.devshed.com/da/stories/Rich%20Backgrounds%20for%20Logos%20and%20Menus/4.jpg" border="0" alt="Creating Backgrounds for Logos and Menus" hspace="0" align="baseline" /></p><p>The  gray sky only serves to increase the brightness of the water and the  orange logo text. Now with this as the banner on your web site everybody  is going to remember MegaCorp.</p><p><span style="color: #800000;"><strong>Rich Backgrounds for Logos and Menus &#8211; The Menu</strong></span></p><p>Now that we have a banner, we need to create menus. Many of the same techniques that served us well for the banner will serve for the menu. There are a couple of extra considerations to keep in mind though. The most important is that a menu repeats. This means that any background image must either be tilable, if it is to be repeated for each menu item, or a single background image must be used for the whole menu.</p><p>For the background image, I selected this shot of wet sand that I took right after a rain storm (only a small segment is shown, since it&#8217;s all much the same):</p><p>Creating Backgrounds for Logos and Menus</p><p>I&#8217;m intending this menu to be on the left hand side of the page with the menu items arranged vertically. 200 pixels makes a pretty good width, so I cut out a 200 pixel wide section on the left hand side.  Since one section of sand is pretty much like any other, I&#8217;m just going to repeat the same bit of sand for each menu item. There is a very faint pattern which emerges, but it&#8217;s not too distracting and doesn&#8217;t looked particularly tiled. If you&#8217;re a real stickler though, or you choose a background that doesn&#8217;t tile smoothly, you can select an image the full height of your source image. That&#8217;s how I started out with this project.</p><p>Now I want some nice looking details to make my menu pop a little. By playing around with my plugins, I discover a nice rounded corner plugin that takes my image, cuts some nice round corners into it, and adds a drop shadow:</p><p>Creating Backgrounds for Logos and Menus</p><p>I experimented with that quite a bit, and it made a really excellent menu, with no risk of tiling effects. It might look even nicer with some strongly textured material such as raw silk or leather. Sand is what we have at present though, so sand is what we&#8217;re going to use.</p><p><span style="color: #800000;"><strong>Rich Backgrounds for Logos and Menus &#8211; Adjusting the Menu Background</strong></span></p><p>Even white lettering was a little hard to read on this sandy background, so I came up with a little cartouche to mark menu items. I took a smaller section of sand and copied it out to its own image. I applied my rounded corners plugin again to keep the shape in line with the shape of the menu. I removed the drop shadow and white background layers as being excess baggage. To make it stand out, and give my lettering something to be seen on, I added a color only layer above the sand and picked the dullest yellow-brown I had available. I merged all of the layers together so I would have a single object to work with.</p><p>A proper cartouche needs a good outline. I  grabbed the magic selection tool and opened the selection range up so  wide that all colored areas were selected. I then converted the  selection to a path and selected the smallest fuzzy edged brush I had  available. I stroked the path using the same color I had selected for  the color layer, giving me a distinct but soft edged border around the  cartouche. The final cartouche looked like this:</p><p><img src="http://images.devshed.com/da/stories/Rich%20Backgrounds%20for%20Logos%20and%20Menus/7.png" border="0" alt="Creating Backgrounds for Logos and Menus" hspace="0" align="baseline" /></p><p>There  are a couple of ways to get this cartouche onto the menu. It could be  made a background to each menu item via cascading style sheets. This is  your only option if you are using a single large image as your menu  background. If you are using a repeating image behind each menu item,  you can graft it on to the item background image, and use cascading  style sheets to position the text properly over the cartouche. Because  the sand tiles smoothly and because I wanted a flexibility in my menu  height, I chose the later route. My individual item tiles now looked  like this:</p><p><img src="http://images.devshed.com/da/stories/Rich%20Backgrounds%20for%20Logos%20and%20Menus/8.jpg" border="0" alt="Creating Backgrounds for Logos and Menus" hspace="0" align="baseline" /></p><p>I  combined this with trimmed bits from the top and bottom of my large  rounded sand image. The cascading style sheet to display them looks like  this:</p><blockquote dir="ltr"><p><span><div class="code">div.menu {<br />width: 230px;<br />}</span></p><p><span>div.menu div.item {<br />width: 230px;<br />height: 50px;<br />text-align: center;<br />vertical-align: middle;<br />font-family: verdana, sans-serif;<br />font-size: 12pt;<br />background-image: url(sand-shadow-item.jpg);<br />}</span></p><p><span>div.menu div.label {<br />background-image: url(sand-menu-top.jpg);<br />font-family: tahoma, sans-serif;<br />font-size: 18pt;<br />font-weight: bolder;<br />color: #ffcc33;<br />height: 30px;<br />width: 230px;<br />text-align: center;<br />}</span></p><p><span>div.menu div.bottom {<br />background-image: url(sand-bottom.jpg);<br />height: 45px;<br />width: 230px;<br />}</span></p><p><span>div.item div.text {<br />color: white;<br />width: 100%;<br />height: 100%;<br />padding-top: 15px;<br />text-align: center;<br />}</div></span></p></blockquote><p>With that style sheet, our menu becomes a very short block of <a href="http://www.devarticles.com/#" target="_blank">HTML<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a>:</p><blockquote dir="ltr"><p><span><div class="code">&lt;div&gt;&lt;div&gt;Menu&lt;/div&gt;<br />&lt;div&gt;&lt;div&gt;Home&lt;/div&gt;&lt;/div&gt;<br />&lt;div&gt;&lt;div&gt;Products&lt;/div&gt;&lt;/div&gt;<br />&lt;div&gt;&lt;div&gt;About Us&lt;/div&gt;&lt;/div&gt;<br />&lt;div&gt;&lt;div&gt;Contact&lt;/div&gt;&lt;/div&gt;<br />&lt;div&gt;&amp;nbsp;&lt;/div&gt;<br />&lt;/div&gt;</div></span></p></blockquote><p>The combined images, style sheets and HTML yield up the following menu:</p><p><img src="http://images.devshed.com/da/stories/Rich%20Backgrounds%20for%20Logos%20and%20Menus/9.jpg" border="0" alt="Creating Backgrounds for Logos and Menus" hspace="0" align="baseline" /></p><p>My  favorite thing about this menu?  I got the cool graphic menu, but I  didn&#8217;t have to create my text as images. That makes my site just a  little more <a href="http://www.devarticles.com/#" target="_blank">search engine<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a> friendly, and that makes me smile.</p><p><strong>Conclusions</strong></p><p>The  two examples here have shown some relatively nice looking site graphics  that were easy to create. A professional can probably do a lot better,  but if you&#8217;re reading this, chances are that you&#8217;re not a professional  designer. For a developer or average Joe building a site, these are a  huge improvement over bland, blocky menus</p>]]></content:encoded><wfw:commentRss>http://web.bearsols.com/development-design/web-authoring/rich-backgrounds-for-logos-and-menus-by-clay-dowling/feed</wfw:commentRss><slash:comments>0</slash:comments></item><item><title>Start Your Own Internet TV Show (By: Ian Felton)</title><link>http://web.bearsols.com/development-design/web-authoring/start-your-own-internet-tv-show-by-ian-felton</link><comments>http://web.bearsols.com/development-design/web-authoring/start-your-own-internet-tv-show-by-ian-felton#comments</comments><pubDate>Fri, 08 Oct 2010 08:16:32 +0000</pubDate><dc:creator>anhnl</dc:creator><category><![CDATA[Web Authoring]]></category><guid isPermaLink="false">http://web.bearsols.com/?p=3399</guid><description><![CDATA[Start Your Own Internet TV ShowBroadcasting events is a lot of fun. download and install Windows Media Encoder for free, and get started with these steps from Ian Felton. Add value to your Website production by saving your broadcast to file, if you have the CPU power to make and keep up an archive.Whether it’s [...]]]></description><content:encoded><![CDATA[<p><span style="color: #800000;"><strong>Start Your Own Internet TV Show</strong></span></p><p>Broadcasting events is a lot of fun. download and install Windows Media Encoder for free, and get started with these steps from Ian Felton. Add value to your Website production by saving your broadcast to file, if you have the CPU power to make and keep up an archive.</p><p>Whether it’s a personal blog, web community or chat room, the success of the Internet owes a great deal of thanks to a type of “Do-It-Yourself/Express Yourself” mentality. When the Internet emerged, millions of people discovered that with a little know-how, any individual could have a voice on the ‘Net. This concept can now be easily extended to include live broadcasts of any type. With costs totaling less than $100, anyone on the Internet can have their own ‘Wayne’s World.’ Now get out your horn-rimmed glasses and mullet-wigs. We are going live.</p><p>Here is a quick checklist of all the specifications for your live broadcast:</p><ul><li>Windows XP</li><li>A web cam</li><li>A microphone</li><li>Windows media encoder <a rel="nofollow" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=5691ba02-e496-465a-bba9-b2f1182cdf24">http://www.microsoft.com/downloads/details.aspx?FamilyID=5691ba02-e496-465a-bba9-b2f1182cdf24</a></li></ul><p><img src="http://images.devshed.com/da/stories/Start%20Your%20Own%20Internet%20TV%20Show/felton%20tv%201.gif" border="0" alt="Internet TV" hspace="0" align="baseline" /><br />First,  download and install Windows Media Encoder from Microsoft’s web site.  Amazingly, it’s a free download and a very powerful software package.  After you have the encoder installed, you may need to reboot your  computer.</p><p>Next, make sure your web cam and microphone are working  properly. I use a Logitech Quickcam Pro 4000. It has a built-in  microphone and face-tracking software. The face-tracking software makes  it appear as if there is an actual cameraman following the movement as  it happens. This cam is a steal at about $50 including shipping.</p><p>Once  your camera and microphone are working, open up the Windows Media  Encoder that you recently installed. A prompt will appear with several  options.</p><p><img src="http://images.devshed.com/da/stories/Start%20Your%20Own%20Internet%20TV%20Show/felton%20tv%202.gif" border="0" alt="Internet TV" hspace="0" align="baseline" /></p><p><span style="color: #800000;"><strong>Start Your Own Internet TV Show &#8211; Setting up Wizard</strong></span></p><p>For now, select “Broadcast a Live Event.” Another display will appear that asks you set your audio and video devices. If you are using the Quickcam Pro, both the audio and video will be coming from the same device. If you are using a different type of setup, select the appropriate camera and microphone and then click next.</p><p><img src="http://images.devshed.com/da/stories/Start%20Your%20Own%20Internet%20TV%20Show/felton%20tv%203.gif" border="0" alt="Internet TV" hspace="0" align="baseline" /></p><p>If  you are broadcasting from a home PC, on the next screen you will want  to “pull from the encoder.” Selecting ‘pull from the encoder’ means that  when a client requests the live broadcast feed, they will begin pulling  the data from your computer. The only time you would want to use a push  method is if you are pushing to a Windows media <a href="http://www.devarticles.com/#" target="_blank">server<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a> and this is probably not the case. Selecting ‘push to a server’ means  that the broadcast will be sent to a remote Windows media server that  will serve the broadcast to clients. Imagine having a PC setup in a  boardroom on the West Coast. Using a push method, the broadcast could be  sent to the company’s server on the East Coast that lives behind a  firewall. Employees would connect to the fire-walled server and receive  the feed from within the company Intranet.</p><p><img src="http://images.devshed.com/da/stories/Start%20Your%20Own%20Internet%20TV%20Show/felton%20tv%204.gif" border="0" alt="Internet TV" hspace="0" align="baseline" /></p><p>On  the next screen you have to select the port that clients will use to  access your live broadcast. You can easily select “Find a free port” and  the <a href="http://www.devarticles.com/#" target="_blank">operating system<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a> will find an available port. If you know the exact port you wish to  use, enter it. Below you will see two different URL’s for accessing the  feed. One is the address to connect via the Internet. The other is the  address for users within the local area network to view the feed.</p><p><strong>Important note:</strong> If you are using a router for your home network, the Internet address  that you see will be the IP address that your router assigned your  computer. It will probably be something like http://192.168.0.1:3100.  This isn’t the IP address that people outside of your network can use to  see your feed. An easy way to find out your IP address is to visit  http://whatismyipaddress.com. Replace the IP address assigned by your  router with this IP address. Be sure to include the port number at the  end of your actual IP address separated with a colon. In addition, you  will need to go into your router’s configuration and open up access to  the port that you are using to broadcast your event. Most routers have  an option for port forwarding or setting up applications. Follow your  router’s directions for opening up ports for <a href="http://www.devarticles.com/#" target="_blank">computers<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a> outside the network to access.</p><p><img src="http://images.devshed.com/da/stories/Start%20Your%20Own%20Internet%20TV%20Show/felton%20tv%205.gif" border="0" alt="Internet TV" hspace="0" align="baseline" /></p><p><span style="color: #800000;"><strong>Start Your Own Internet TV Show &#8211; Configuring the Type of Encoding for the Broadcast</strong></span></p><p>The next configuration step involves determining the type of encoding to use for the broadcast. The most important factor in determining what type of encoding to use is the processing speed of your computer. Encoding video and audio in a live environment uses more CPU power than just about anything so without heavy-duty hardware, you should stick to a low-quality encoding. Don’t worry about this though, because even at low quality, the results are acceptable for most purposes. Start at a low quality and monitor the performance of your computer. Then work your way up in quality until you find a balance between CPU performance and audio and video quality. Also, determine which aspect of your broadcast is more important, audio or video. The encoder allows you to specify the bit-rate of the audio and video separately. Therefore, if you want people to see what you are broadcasting more than what is being heard, set your audio quality very low then increment the quality of the video until you get the best results.</p><p>After that, you have the option of saving the file to disk. The entire broadcast will be saved as a Windows Media file. While having a backup of the event to later archive on your web site feels great, it also decreases the performance of the entire encoding process so weigh out the archival of events versus quality of audio and video.</p><p>The main part of the configuration is now complete. You have the option include other files to use as welcome screens or intermissions and can also include copyright information. However, if you are not requiring those at this point the wizard can be finished and your broadcast will begin.</p><p>When the encoder begins broadcasting, the Windows XP firewall will display a message that the encoder is trying to change the firewall settings. Allow this to happen or your broadcast won’t be viewable. The encoder is telling the operating system that it needs access to a port and to make it publicly accessible. For some reason, even if you click, ‘Do Not Show This Message Again’, it still will continue to display it, so don’t bother with checking it.</p><p><span style="color: #800000;"><strong>Start Your Own Internet TV Show &#8211; Checking Your Broadcast</strong></span></p><p>At this point your broadcast should have started. There is a panel for viewing the input and output and the microphone levels. There are tabs at the bottom of the interface that allow you to monitor CPU load, the number of connections and more. The number of connections defaults to 5. If you expect more than 5 people to view your broadcast at once, there is a registry key that you can edit to allow 50 people to log in at once. If you go this route, hopefully your CPU and Internet connection can handle the load. Here is the key to edit if you want to increase the maximum number of connections:</p><p>HKEY_CLASSES_ROOTSoftwareMicrosoftWindows Media ToolsEncoderMaxClientConnections</p><p>Set the number to anything between 1 and 50.</p><p><img src="http://images.devshed.com/da/stories/Start%20Your%20Own%20Internet%20TV%20Show/felton%20tv%206.gif" border="0" alt="Internet TV" hspace="0" align="baseline" /></p><p>Returning  to the tabbed panes, go to the general panel. This will give you a  broad overview of your broadcast. You can monitor CPU load, the number  of clients, disk space and see if a lot of frames are being dropped.</p><p>If  you notice that a lot of frames are being dropped and your PC is  running at 100% constantly, go to the statistics panel. Look at the  Audio Input and Video Input tables on the left.</p><p>If you see that a  lot of samples and frames are being dropped, you need to either free up  system resources or you should go ahead and use a lower quality. You  will save <a href="http://www.devarticles.com/#" target="_blank">processor<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a> power and will end up with a higher quality broadcast than if you stay  at a high setting and keep dropping tons of frames. Open up your task  manager and kill and processes that you don’t need. The machine you are  broadcasting from should be solely broadcasting if you expect to have a  decent event. Kill any screensaver applications, weather software,  instant messengers, etc. and you will have a lot more muscle for your  show.</p><p><img src="http://images.devshed.com/da/stories/Start%20Your%20Own%20Internet%20TV%20Show/felton%20tv%207.gif" border="0" alt="Internet TV" hspace="0" align="baseline" /></p><p>On  the ‘Server’ tab there are more statistics to monitor. If you have  forgotten your addresses you can find them again in this tab. The  ‘Connections’ tab allows you to monitor your client connections and when  they connect and disconnect. The ‘Event Log’ displays the events that  occur while broadcasting.</p><p>Once you get a feel for the encoder,  get out your mullet wigs and have at it. You can use an object or embed  tag to include the broadcast in a web page. Broadcasting events is a lot  of fun, and if you have the CPU power to save it to file, having  archives of your event can add a lot of value to your overall web site  production. Feel free to email links to your live events once you are up  and running.</p>]]></content:encoded><wfw:commentRss>http://web.bearsols.com/development-design/web-authoring/start-your-own-internet-tv-show-by-ian-felton/feed</wfw:commentRss><slash:comments>0</slash:comments></item><item><title>Using Adobe GoLive CS, Part 3 (By: Sams Publishing)</title><link>http://web.bearsols.com/development-design/web-authoring/using-adobe-golive-cs-part-3-by-sams-publishing</link><comments>http://web.bearsols.com/development-design/web-authoring/using-adobe-golive-cs-part-3-by-sams-publishing#comments</comments><pubDate>Fri, 08 Oct 2010 08:11:21 +0000</pubDate><dc:creator>anhnl</dc:creator><category><![CDATA[Web Authoring]]></category><guid isPermaLink="false">http://web.bearsols.com/?p=3398</guid><description><![CDATA[Using Adobe GoLive CS, Part 3The second article in our series covering Adobe  GoLive we&#8217;ll be working with images, CSS, and JavaScript. (This chapter  comes from Teach Yourself Adobe Creative Suite, by Mordy Golding, Sams, 2004, ISBN: 067232752X.)Working with ImagesBecause you&#8217;ve got the Adobe Creative Suite in your hot little hands, you&#8217;ve got the [...]]]></description><content:encoded><![CDATA[<p><span style="color: #800000;"><strong>Using Adobe GoLive CS, Part 3</strong></span></p><p>The second article in our series covering Adobe  GoLive we&#8217;ll be working with images, CSS, and JavaScript. (This chapter  comes from <em>Teach Yourself Adobe Creative Suite</em>, by Mordy Golding, Sams, 2004, ISBN: 067232752X.)</p><p><a rel="nofollow" href="http://www.amazon.com/exec/obidos/ASIN/067232752X/develshedinc-20/104-8293529-2444712?dev-t=mason-wrapper%26camp=2025%26link_code=xm2"><img src="http://images.devshed.com/da/stories/Using%20Adobe%20GoLive%20CS%20123/showcover.jpg" border="0" alt="Using Adobe GoLive CS" hspace="5" vspace="2" align="left" /></a><strong>Working with Images</strong></p><p>Because you&#8217;ve got the <a href="http://www.devarticles.com/#" target="_blank">Adobe<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a> Creative Suite in your hot little hands, you&#8217;ve got the most powerful  set of tools on the planet to create images of any type. A picture is  worth a thousand words, but when it comes to the Web, it had better not  be worth a thousand kilobytes. Not to worry, the CS tools offer various  ways to prepare images for the Web, and you can find these tools in  Photoshop, ImageReady, and Illustrator. So go crazy and design like a  maniac; but when you are done, compress those little beauties into an  appropriate Web format. (And be sure to read the upcoming section  &#8220;Integration Using Photoshop CS, ImageReady CS, Illustrator CS, or  Acrobat PDF Files,&#8221; which will make the process quick and painless!)</p><p>The  three most common image types for the Web are GIF, PNG, and JPEG. In  general, you will want to use GIF or PNG for graphic images, especially  those containing just a few colors, such as logos, while reserving JPEG  for photographs.</p><p><strong>Methods for Placing Images</strong></p><p>To  put an image on a page, you can simply select the image from the Files  list in your site window and drag it directly onto the page. Images can  be dragged onto a page or into a table cell, a layout grid, or a layer.</p><p>Another  method of putting an image on a page is to use the Image object, which  acts as a placeholder until you link it to the desired image. To put an  image placeholder on the page, either drag and drop the Image object  from the Objects palette, double-click the Image object in the Objects  palette, or (control-click) [right-click] and choose Insert Object,  Basic, Image. After the Image placeholder is on the page, your next step  is to link it up to the image file. You can do so by using the Fetch  URL tool to point and shoot at the image file in your Files list, or by  clicking the Browse button at the right end of the Source field in the  Image Inspector, or by choosing a filename from the Recently Used pop-up  list at the far-right end of the Source field.</p><p>Let&#8217;s take a look  at the Image Inspector. Place an image onto a page and select it. Notice  that the Inspector palette now has four buttons across the top, called  Basic, More, Link, and Color Profile:</p><ul><li><strong>Basic —</strong>The  Basic area is where you reference the source file, set its size in width  and height, choose an alignment, define the Alt text, and assign a name  and an ID.</li><li><strong>More —</strong>Go to the More area to assign a  low-source image, which is a low-resolution version of an image that the  browser displays while a higher- resolution version is loading. You can  have GoLive automatically generate the low-source version of your image  by clicking the Generate button in the Inspector. In the More tab you  can also choose horizontal or vertical spacing around the image (HSpace  and VSpace), select a border size, designate whether the image is to be  used as an image map, or define whether the image is to be used as a  submit button for a form.</li><li><strong>Link —</strong>Select the Link area to create a hyperlink on the image and to set the link&#8217;s target, title, name, and ID.</li><li><strong>Color Profile —</strong>Use the Color Profile area to select a color profile for the image.</li></ul><blockquote><hr /><strong>Tip -</strong> A great way to bring images into GoLive is by using the operating  system&#8217;s internal clipboard. You can copy an image, including  screenshots, to your internal clipboard, and then switch over to a  GoLive page and paste. GoLive fires up the Save for Web window, which  will allow you to compress the image to an appropriate Web format and  save it into your site.</p><hr /></blockquote><p><strong>Image Maps</strong></p><p>Image  mapping, once a tedious and frustrating process done by hand, is now as  easy and fun as using a drawing program. Using the drawing tools in  GoLive, you can create hotspots on your image. The hotspots can be  square, round, or other shapes. Each hotspot you draw can then be  assigned a link. In this way, you can have one image that links to many  places.</p><p>Select an image, and then click the More button in the  Image Inspector. Click the check box next to the words Use Map. Doing so  enables the hotspot drawing tools in the Main toolbar. Select the  Rectangular, Circular, or Polygonal Map-area tool. Click and drag to  draw with the Rectangular or Circular Map-area tool; click multiple  times to draw a shape with the Polygonal Map-area tool (see Figure  9.61).</p><p><strong><img src="http://images.devshed.com/da/stories/Adobe%20GoLive%20CS/mini-09fig61.jpg" border="0" alt="" hspace="0" align="baseline" /></strong></p><p><strong>Figure 9.61</strong> <em>This image contains a rectangular,<br />a circular, and a polygonal hotspot.</em></p><p>When  you are done drawing hotspots, you can click the Select Map-area tool  to move them around or resize them by dragging a corner point. Select  each hotspot you have drawn, and create a hyperlink for it using any of  the linking techniques we learned earlier in this chapter.</p><h1></h1><p><span style="color: #800000;"><strong>Using Adobe GoLive CS, Part 3 &#8211; Rollovers</strong></span></p><p>If you&#8217;ve ever visited a Web site and put  your cursor over an image only to have it change color, you&#8217;ve likely  encountered a rollover. A rollover is an image whose appearance changes  as the user rolls her mouse over it. Combined with hyperlinks, rollovers  give the user a clear visual clue as to which item she is about to  click. Rollovers are created by using a different image for each state  of the mouse. For example, you could assign a blue button image when the  mouse is not on the button, and a yellow button image when the mouse is  over the button.</p><p>GoLive CS includes a nifty feature called  automatic rollover detection, and it is a real time-saver. Simply by  naming your images in a particular way, you can enable GoLive to  recognize them as rollovers and automatically write and implement the  necessary JavaScript to make the rollovers function. To access settings  that make this detection possible, open the Rollovers &amp; Actions  palette from the Window menu, and then choose Rollover Detection  Settings from the palette&#8217;s flyout menu (see Figure 9.62).</p><p><strong><img src="http://images.devshed.com/da/stories/Adobe%20GoLive%20CS/mini-09fig62.jpg" border="0" alt="" hspace="0" align="baseline" /></strong></p><p><strong>Figure 9.62</strong> <em>You can access the automatic Rollover Detection Settings from the Rollovers &amp; Actions palette&#8217;s flyout menu.</em></p><p>By  default, three sets of naming conventions are already included in the  list, but you can easily edit any of the defaults, or add your own set.  How does it work? It&#8217;s simple. If you place an image onto a page that is  named <tt>house.jpg</tt>, and there is another image in your Files list called <tt>house_Over.jpg</tt>,  GoLive automatically detects this pair and creates the JavaScript  rollover. As you can see from the detection settings, you can have  multiple states for an image, though Normal and Over are the most widely  used (see Figure 9.63).</p><p>If you prefer, you can create rollovers  manually in the Rollovers &amp; Actions palette. Select an image on the  page, and then choose a State in the list. Next, click the Create New  Rollover Image button and link to the image you want to use for that  state.</p><p><strong><img src="http://images.devshed.com/da/stories/Adobe%20GoLive%20CS/mini-09fig63.jpg" border="0" alt="" hspace="0" align="baseline" /></strong></p><p><strong>Figure 9.63</strong> <em>You can apply as many as six different states to a rollover automatically, simply by naming the images a certain way!</em></p><p>Integration Using Photoshop CS, ImageReady CS, Illustrator CS, or Acrobat <a href="http://www.devarticles.com/#" target="_blank">PDF Files<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a></p><p>One  of the most compelling features (and definitely the coolest feature) of  GoLive is its integration with the other applications in the Creative  Suite. Through the use of Smart Object technology, it is possible to use  your native Photoshop, ImageReady, Illustrator, and PDF documents in <a href="http://www.devarticles.com/#" target="_blank">your Web pages<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a>.  You read that correctly! GoLive accepts the native Photoshop,  Illustrator, or PDF file and compresses it to an appropriate Web format.  But the magic begins when the source file is edited, because those  edits are automatically reflected in the Web-ready version of the image.</p><p>Take a native Photoshop ( <tt>.psd</tt>), Illustrator ( <tt>.ai</tt>), or Acrobat PDF document ( <tt>.pdf</tt>), and drag it into an open GoLive HTML page. GoLive immediately recognizes the <tt>.psd</tt>, <tt>.ai</tt>, or <tt>.pdf</tt> filename extension as a friendly file type, one to embrace and care  for. GoLive&#8217;s first step toward accommodating the source document is to  bring up the Save for Web dialog box, which will allow you to determine  an appropriate Web file format for the image, adjust compression  settings, resize the image if necessary, and then save the resulting  GIF, JPEG, or PNG file into your Web site (see Figure 9.64). During the  Save process, GoLive helpfully assigns the Web-friendly version of the  image a filename based on the source file.</p><p><strong><img src="http://images.devshed.com/da/stories/Adobe%20GoLive%20CS/mini-09fig64.jpg" border="0" alt="" hspace="0" align="baseline" /></strong></p><p><strong>Figure 9.64</strong> <em>The Save for Web dialog box is built right into GoLive CS, allowing you to easily prepare images for the Web.</em></p><p>The Save for Web dialog box offers a wide variety of views and tools:</p><ul><li><strong>Original tab—</strong>Shows the image in its original form.</li><li><strong>Optimized tab—</strong>Shows the image after optimization has been applied.</li><li><strong>2-Up tab—</strong>Shows original and optimized versions next to each other. Click one to edit its settings.</li><li><strong>4-Up tab—</strong>Shows original and three variations of the optimized image. Click one to edit its settings.</li><li><strong>Hand tool—</strong>Use to move the image in the window.</li><li><strong>Slice Select tool—</strong>Use  to select a slice when optimizing a sliced image from Photoshop,  ImageReady, or Illustrator. Click the slice to edit its settings.</li><li><strong>Zoom tool—</strong>Zooms in when you click on the image. Press the (Option) [Alt] key to zoom out.</li><li><strong>Eyedropper tool—</strong>Click on the image with the Eyedropper to select a color.</li><li><strong>Eyedropper color—</strong>Shows the currently selected color.</li><li><strong>Toggle slices visibility—</strong>Makes the borders of slices visible or invisible.</li><li><strong>Settings area—</strong>Choose the optimized file type, compression levels, transparency and dither types, and matte settings.</li><li><strong>Preset pop-up menu—</strong>Shows a list of preconFigured compression settings. Choosing one alters settings in the Preset area.</li><li><strong>Preset flyout menu—</strong>Save, edit, or delete settings from the list in the pop-up.</li><li><strong>Color Table—</strong>Shows colors used when GIF or PNG-8 is selected as the file type.</li><li><strong>Image Size—</strong>Adjust the image size, and then click Apply.</li><li><strong>Cancel button—</strong>Closes the Save for Web window without applying the settings.</li><li><strong>Save button</strong>—Closes the Save for Web window and opens the Save dialog.</li></ul><p>When  created, the Smart Object, called the target file, retains a link back  to the original document, and it will be updated if the original is  changed. The original document is referred to as the source file. You&#8217;ll  know it&#8217;s a Smart Object and not a plain old GIF or JPEG because of the  small icon in the lower-right corner (see Figure 9.65).</p><p><strong><img src="http://images.devshed.com/da/stories/Adobe%20GoLive%20CS/mini-09fig65.jpg" border="0" alt="" hspace="0" align="baseline" /></strong></p><p><strong>Figure 9.65</strong> <em>Smart Object target files are indicated<br />by an icon in the lower-right corner.</em></p><p>To  reopen the source file in Photoshop or Illustrator, just double-click  on the target file. Edit the source file in its originating application,  save it, and then flip back to GoLive. The target image will  automatically update without asking you to recompress it, resize it,  rename it, or anything!</p><p><span style="color: #800000;"><strong>Using Adobe GoLive CS, Part 3 &#8211; More on rollovers</strong></span></p><p>Select the target version of the file on your  page and look at the Inspector palette (see Figure 9.66). There are a  few more options than those that were available when you placed a normal  GIF or JPEG file. The first field indicates the location of the source  file, and the second shows the path to the target file. Next are two  important buttons called Settings and Variables. The Settings button  opens the Save for Web dialog box so that you can edit your compression  settings. The Variables button opens the Variable Settings dialog box,  where you can assign a value to a variable, which is discussed in  greater detail in the next section. Below those two buttons are some  very nifty tools called Matte, Crop, and Scale, whose usage is also  discussed in the next section.</p><p><strong><img src="http://images.devshed.com/da/stories/Adobe%20GoLive%20CS/mini-09fig66.jpg" border="0" alt="" hspace="0" align="baseline" /></strong></p><p><strong>Figure 9.66</strong> <em>The Smart Object Inspector.</em></p><p>In the next section we&#8217;ll take a look at what special integration features may exist between the various apps.</p><blockquote><hr /><strong>Tip -</strong> In the Extras Tab of the site window is a folder called <tt>SmartObjects</tt>. This is a convenient place to house your native Photoshop, Illustrator, and <a href="http://www.devarticles.com/#" target="_blank">PDF files<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a>;  however, it&#8217;s not mandatory that they be placed there. You can add a  Smart Object to your Web page from anywhere. As long as the original  document does not move to a different location, GoLive will keep the  connection between the Web version of the image and its original.</p><hr /></blockquote><p>There are several ways to place a Smart Object onto a GoLive page:</p><ul><li>Drag and drop the source file from your drive onto the GoLive page.</li><li>Drag and drop the source file from the <tt>SmartObjects</tt> folder onto the GoLive page.</li><li>Drag  and drop a Smart Object placeholder from the Smart set of the Objects  palette onto the page, and then use the Inspector palette to link to the  source file.</li><li>Place your mouse pointer on the page where  you want the Smart Object placeholder to go, and then double-click the  Smart Object placeholder in the Smart set of the Objects palette. Use  the Inspector palette to link to the source file.</li></ul><blockquote><hr /><strong>Tip -</strong> Note that there are several Smart Object types in the Smart set of the  Objects palette: Smart Photoshop, Smart Illustrator, Smart PDF, and one  named Smart Generic. In my experience any one of them will do. I&#8217;ve used  the Smart Photoshop object to load an Illustrator document, and the  Smart Illustrator object to load a PDF. You get the idea. Mainly I  prefer to drag a Photoshop, Illustrator, or <a href="http://www.devarticles.com/#" target="_blank">PDF file<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a> right onto the GoLive page and forgo placing the Smart Object placeholder altogether.</p><p><span style="color: #800000;"><strong>Using Adobe GoLive CS, Part 3 &#8211; Even More on Rollovers</strong></span></p><p>There is one instance in which it is necessary to first place the Smart Object placeholder on the page, and then link to the source file—and that is when you want to use a file type besides the native Adobe file formats. The supported file types are BMP, PCX, Pixar, Amiga IFF, TIFF, TARGA, PDF, EPS, JPEG, JPEG 2000, PNG, and PICT (Mac OS only).</p><p>To resize a target file, simply select one of its corner handles and drag. To size proportionately, hold down the Shift key as you drag. When you release the mouse, GoLive will re-render the target file for you.</p><p>Photoshop transparency is recognized by GoLive CS as well, so if you create a Photoshop file with a transparent background and save it as a GIF with transparency, the transparent areas will be retained. If the matte color, which is the color on which the image was created, of the Photoshop image does not match the color of your GoLive page, you can re-matte the target file using the tools in the Inspector palette. This feature comes in handy, for example, when an image using transparency was matted on a white background, but the GoLive page color is blue. In such an instance the image would have a white halo around its edges. Re-matting the image on a blue background allows it to seamlessly blend in with the GoLive page.</p><p>To change the matte color of the target image, select the image on the page, click the Matte color well in the Inspector, either click a color in the Color or Swatches palette, or use the Eyedropper tool in the Color palette to pick up the background color on the page, and then click Apply in the Inspector palette. GoLive re-renders the target file with the new Matte color. Alternatively, you could click the Settings button in the Inspector palette and use the Matte color options in the Save for Web dialog box.</p><p>See Figure 9.67 for examples of how a source Photoshop file with a transparent background layer will appear as a target file.</p><p><strong><img src="http://images.devshed.com/da/stories/Adobe%20GoLive%20CS/mini-09fig67.jpg" border="0" alt="" hspace="0" align="baseline" /></strong></p><p><strong>Figure 9.67</strong> <em>Smart Objects with various transparency<br />and matte settings.</em></p><p>Finally,  you can crop a Smart Object using the new Crop tool in the Inspector  palette. Select the target file on your page, and then click the Crop  tool. Drag over the image to select the portion you want to keep, and  the part that will be cropped becomes dimmed. If your selection is not  quite right, you can move it around, or drag a corner point to resize  it. To accept the crop, either double-click inside the crop marks or  click the Crop Image button in the toolbar.</p><p>There are additional  crop options in the toolbar (see Figure 9.68) that allow you to crop the  transparent pixels at the top, bottom, right, or left side of the  image. Also in the Main toolbar when the Crop tool is active is a pop-up  menu called Scaling, which offers the following options:</p><ul><li><strong>Keep Scaling—</strong>Crops the image to the size of the crop marks.</li><li><strong>Keep Object Size—</strong>Crops  the image, but fills the space used by the original image. This works  when you&#8217;re cropping an image larger or smaller than the original.</li><li><strong>Scale to Source File—</strong>Crops the image to the size of the original file.</li></ul><p>If,  after all that cropping, you&#8217;d like to return the target image to its  first incarnation, select it on the page, click the Crop tool in the  Inspector palette, and then click the Use Original Image button in the  Main toolbar.</p><p><strong><img src="http://images.devshed.com/da/stories/Adobe%20GoLive%20CS/mini-09fig68.jpg" border="0" alt="" hspace="0" align="baseline" /></strong></p><p><strong>Figure 9.68</strong> <em>The cropping tools.</em></p><p><span style="color: #800000;"><strong>Using Adobe GoLive CS, Part 3 &#8211; Photoshop Integration</strong></span></p><p>If you are a Photoshop aficionado, you&#8217;ll already be familiar with Photoshop layers. If you&#8217;re new to Photoshop, take a look at Chapter 5, &#8220;Using Adobe Photoshop CS,&#8221; to understand this wonderful feature. When you&#8217;re using a Smart Photoshop object in GoLive, the layers feature works in a special way. Any Photoshop file that includes a top layer containing text can be used as a variable in GoLive. In case you are not familiar with the term variable, it simply means &#8220;something that varies.&#8221; In the case of a Photoshop text layer, it&#8217;s the text that can vary. To illustrate this point, let&#8217;s do a very quick exercise.</p><p>In Photoshop CS create a new document. Select the Text tool and click on the page, and then type the words Placeholder Text. Format the text any way you&#8217;d like using your favorite font, color, and effect. Then save the file as a native Photoshop document.</p><p>Next, open a GoLive page, and drag and drop  the new Photoshop document onto the page. A dialog box called Variable  Settings will appear. Click the check box next to Topmost Text layer to  enable it and an input field will open. In the input field type <strong>Adobe GoLive CS</strong>, and then click OK (see Figure 9.69).</p><p><strong><img src="http://images.devshed.com/da/stories/Adobe%20GoLive%20CS/mini-09fig69.jpg" border="0" alt="" hspace="0" align="baseline" /></strong></p><p><strong>Figure 9.69</strong> <em>The Variable Settings dialog box.</em></p><p>The  Save for Web dialog box will open, and you&#8217;ll see the image you just  created in Photoshop, except that the text you entered into the Variable  Settings dialog box will have replaced the placeholder text in the  source file. Choose the file format GIF and click the Save button to  save the GIF file.</p><p>Now, select your newly made GIF on the page,  and in the Inspector palette click the Variables button to reopen the  Variable Settings window. This time type <strong>Very, very cool!</strong> and then click OK. GoLive re-renders the target object using the settings you specified originally.</p><p>By  now you are probably getting the idea, but just in case you&#8217;ve missed  the point, let me be specific. You can use one source file to create  multiple variations of the target file for use on different pages. If  you update the original source artwork, the target files can be updated  as well. The update happens automatically when you open a page using a  target file, or you can force the update by selecting the source file in  the <tt>SmartObjects</tt> folder and then choosing Site, Update Files Dependent On, Selection.</p><blockquote><hr /><strong>Tip -</strong> After having initially created a target file, you can place it on as  many pages as you would like. However, if you want to be able to resize  the image differently on various pages, then you need to create a unique  target file with its own name for each instance in which it is used.  You can manage this task by copying and pasting the target file to  another page, and then, in the Inspector palette, click the folder icon  at the right end of the target input field. You&#8217;ll be able to  re-optimize and/or resize the image, rename it, and save the new version  of the target file into your site.</p><p><span style="color: #800000;"><strong>Using Adobe GoLive CS, Part 3 &#8211; ImageReady and Illustrator Integration</strong></span></p><p>If you think the text variables feature between Photoshop and GoLive is sweet, hold on to your hats, because it gets even better when you bring ImageReady CS or Illustrator CS into the picture. Using ImageReady or Illustrator, not only can the topmost text layer act as a variable, but any text layer can be designated as a variable. Additionally, you can add a visibility variable to any image layer, meaning that in GoLive you can specify whether an image layer is turned on or off. For instructions on how to set up variables in ImageReady CS, refer to Chapter 6, &#8220;Using Adobe ImageReady CS.&#8221; For instructions on how to set up variables in Illustrator CS, refer to Chapter 7, &#8220;Using Adobe Illustrator CS.&#8221;</p><p>When you drag and drop an ImageReady CS  Photoshop-format document or an Illustrator SVG file that contains  variables into a GoLive page, the Variable Settings dialog box opens and  allows you to choose which layers to make visible or invisible and  which text strings to change. To enable a variable, check the Use box  next to the variable&#8217;s name. For image layers choose Visible or  Invisible from the pop-up menu; for text layers type the desired text  string into the input field (see Figure 9.70).</p><p><strong><img src="http://images.devshed.com/da/stories/Adobe%20GoLive%20CS/mini-09fig70.jpg" border="0" alt="" hspace="0" align="baseline" /></strong></p><p><strong>Figure 9.70</strong> <em>When  you&#8217;re using an ImageReady Photoshop-format file or an Illustrator SVG  file, the Variable Settings dialog box lets you select the variables to  use and which options to assign to each.</em></p><p><strong>PDF Integration</strong></p><p>In  addition to GoLive&#8217;s capability to generate PDF files from HTML pages,  GoLive also tracks links in PDFs and allows you to create or edit links  in PDFs. Double-click a <a href="http://www.devarticles.com/#" target="_blank">PDF file<img src="http://images.intellitxt.com/ast/adTypes/mag-glass_10x10.gif" alt="" /></a> in your Files list to preview the PDF, and then click the Link Editing  button at the top of the window to enter the editing mode. Choose the  New Link tool from the toolbar to draw links onto the PDF, or the Edit  Links tool to edit existing links, and then set the link&#8217;s attributes in  the Inspector palette (see Figure 9.71).</p><p>Additionally, you can  use a PDF as a Smart Object. This is especially useful if you&#8217;d like to  create a thumbnail image of a PDF to use as a link to the full version.  Drag and drop a PDF onto your GoLive page, and the PDF Options dialog  box will appear, where you can select which page of the PDF you&#8217;d like  to use for your target file (see Figure 9.72). Select the page and the  orientation in the dialog box, and then click OK. When the Save for Web  window opens, proceed as described in the &#8220;Photoshop Integration&#8221;  section earlier in this chapter.</p><p><strong><img src="http://images.devshed.com/da/stories/Adobe%20GoLive%20CS/mini-09fig71.jpg" border="0" alt="" hspace="0" align="baseline" /></strong></p><p><strong>Figure 9.71</strong> <em>A PDF can be edited directly in GoLive CS using the tools that appear in the Main toolbar when you enter PDF link editing mode.</em></p><p><strong><img src="http://images.devshed.com/da/stories/Adobe%20GoLive%20CS/mini-09fig72.jpg" border="0" alt="" hspace="0" align="baseline" /></strong></p><p><strong>Figure 9.72</strong> <em>The PDF Options window.</em></p></blockquote></blockquote><p><span style="color: #800000;"><strong><br /></strong></span></p><p><span style="color: #800000;"><strong><br /></strong></span></p>]]></content:encoded><wfw:commentRss>http://web.bearsols.com/development-design/web-authoring/using-adobe-golive-cs-part-3-by-sams-publishing/feed</wfw:commentRss><slash:comments>0</slash:comments></item><item><title>Evaluating XHTML Editors (By: Dan Wellman)</title><link>http://web.bearsols.com/development-design/web-authoring/evaluating-xhtml-editors-by-dan-wellman</link><comments>http://web.bearsols.com/development-design/web-authoring/evaluating-xhtml-editors-by-dan-wellman#comments</comments><pubDate>Fri, 08 Oct 2010 08:01:36 +0000</pubDate><dc:creator>anhnl</dc:creator><category><![CDATA[Web Authoring]]></category><guid isPermaLink="false">http://web.bearsols.com/?p=3396</guid><description><![CDATA[Evaluating XHTML EditorsYou&#8217;ve learned your Web programming language well enough that using a plain vanilla text editor no longer instructs; it slows you down. In short, you&#8217;re ready for an XHTML editor. Which one should you choose? Dan Wellman checks them out, and discovers you may not have to spend any money at all to [...]]]></description><content:encoded><![CDATA[<p><span style="color: #800000;"><strong>Evaluating XHTML Editors</strong></span></p><p>You&#8217;ve learned your Web programming language well enough that using a plain vanilla text editor no longer instructs; it slows you down. In short, you&#8217;re ready for an XHTML editor. Which one should you choose? Dan Wellman checks them out, and discovers you may not have to spend any money at all to get one that suits your needs just fine.</p><p>Without doubt, one of the best ways to learn a new Web programming language is to create all your first documents using nothing but a simple text editor, like Notepad. By hand-coding your first generation of documents using a basic text editor, you can really get a feel for the syntax of the language and the core components that make it up.  It is proven that learning is maximized by writing down the subject that you are learning, so using an application to take care of all the fundamental aspects of your documents, such as structure and definition tags, kind of defeats the object. This is as true for XHTML as it is for PHP, JavaScript or any of the other myriad of Web programming languages and specifications available to the Web developer today.</p><p>But when you’re feeling a little more confident in your language of choice, you may begin to tire of typing out the same old tags, document after document after document. You’ll begin to find that using your plain old text editor is now boring you and slowing you down. It’s easy to lose interest in the task at hand when that task has become pure monotony, and losing interest in the site you are building can mean only failure or mediocrity at best, which is bad news for anyone planning on reeling in the surfers. Of course, some people never tire of the simplicity and power of the humble text editor, and this is fine, but for those of you that want to focus on content, you may find a dedicated &#8220;what you see is what you get&#8221; editor just the tool you’re looking for.</p><p>For experienced HTML coders, making the switch to XHTML will be a relatively easy step to take; include some basic XML declarations, adhere to a few basic rules, remember not to use certain tags and you’re pretty much there. Once you’ve gotten out of the bad habits formed while using HTML, you may find that using an XHTML editor increases your output of valid, well-formed documents. If you do decide that this is the way forward for you, one of the following examples of this type of software may be exactly what you are looking for.</p><p>Unfortunately, there do not seem to be a great many stand-alone, dedicated XHTML editors around, which I can only attribute to the relative newness of the specification. This can be seen either as a good thing, because there are not that many to choose from, or a bad thing, because there are not that many to choose from! What I mean is that finding an editor you like won&#8217;t be a particularly time consuming task. Hopefully, after reading this, it will be even easier!<br /><span style="color: #800000;"><strong>Evaluating XHTML Editors &#8211; HTML Gate 2005</strong></span></p><p>For the home enthusiast, or developer on a budget, I seriously recommend the outstanding HTML Gate 2005 from MPS (www.mpsoftware.dk). The application is absolutely free and is a fully functioning, multi-language wysiwyg editor. It has one of the nicest looking interfaces I’ve ever seen on a freeware program, far nicer than some of the software in the next bracket up. It is extremely intuitive; you can literally download it, install it and begin using it.</p><p>The program does seem tailored slightly towards HTML editing, but you can switch it over to default XHTML 1.0 Strict DTD with a brief forage into the Tools -&gt; Preferences dialog box. Once you’ve updated the editor setting to XHTML, all of your new documents will appear with the DOCTYPE declaration present, in addition to the mandatory elements such as &lt;html&gt;, &lt;head&gt; and &lt;body&gt; tags.</p><p>HTML Gate comes with a massive code library, giving you the core components and often the reserved words of a large chunk of popular web languages such as HTML, JavaScript, PHP CSS and more.</p><p>There are two main modes of page creation: code edit and fast edit.  In code edit mode, you are responsible for entering the tags and content, whereas in fast edit, you only need enter the content. I would recommend you use the code edit option if you are creating XHTML Strict documents, as the tags inserted by the program when using fast edit mode  are often deprecated. This can cause the DTD of your document to be automatically changed to Transitional.</p><p>The code edit mode makes creating XHTML easy anyway&#8211;it can be set to close open tags for you if you forget, and even has a handy tag-prompter that opens when a left angle bracket is inserted.</p><p>Another useful feature is the W3 tidy mode. Best used once you’ve written the code for your documents, it checks your document for well-formedness and validity. It scans through the document you’ve written, closes any tags left open, and prompts you for missing attributes. It’s handy, but you should still check your documents manually for errors, as some of the invalid code I used when testing the program slipped through.</p><p>There are a few minor annoyances in the flow of the program, but overall, this is an impressive piece of software that would be at home in any Web developer&#8217;s tool box. Frankly, I’m surprised it’s free.</p><p><span style="color: #800000;"><strong>Evaluating XHTML Editors &#8211; Altova&#8217;s XML Spy Home Edition</strong></span></p><p>Also in the freeware category is the all-powerful Altova’s XML Spy Home Edition, which is another excellent entry level application. As the name suggests, it is not a dedicated XHTML editor, but encompasses all things XML. The program has a lot of features, which is great if you’re looking for a complete solution, but for just XHTML editing, it seems like overkill.</p><p>Nevertheless, the main program window is divided into a well thought out workspace that lets you get on with the business of coding without getting in your way or distracting you. For creating a new XHTML document, you are given all the necessary document level elements, including the optional XML declaration as well as the XHTML namespace.</p><p>The application can be a little counter-productive if you’re looking to create XHTML Transitional documents, as the Strict DOCTYPE is added without giving you any choice. The validation and well-formedness checks are pretty impressive for a freeware application, better in fact than most other available editors; you can perform independent checks on the document being valid and well-formed, and the program picked up on most of the errors I threw at it. The only inconsistency is its allowance of some deprecated tags; it allows you to use the &lt;b&gt; tag, but it did pick up on the illegal use of the &lt;font&gt; tag.</p><p>It offers all of the standard extras, such as code-highlighting and automated element menus when typing an opening bracket, but surprisingly, if it does offer a line numbering facility, it is not immediately obvious. Still, this is  a great piece of software, even if it does leave you feeling as if you’re simply using the advertisement for a bigger and better edition.</p><p><span style="color: #800000;"><strong>Evaluating XHTML Editors &#8211; Hypertext builder, Web Scripting editor</strong></span></p><p>The next group of applications fall into the $40-$100 price range and usually come with the standard 20-30 day trial. Aiming more for the low end of the professional market or the very high end of the home market, software in this category tends to be a little more polished, have a few more features and generally (although not always) work better than their freeware counterparts.</p><p>Hypertext builder 2004 is a reasonable product that falls into this category; it’s the cheapest non-freeware editor I’ve found at $30 for the registered version, and offers a no-nonsense interface with a handy documentation window built into the main program window. It’s easy to use, but in all honesty, it feels a bit like an old Windows 95 application; the interface looks a little rough and the tool selections are not very comprehensive.</p><p>It’s an okay application, but for an extra $10 you can get Blueprints’ Web Scripting editor (http://www.blueprint-software.net). Currently in its 5.3 version, this application offers a cool, minimalist and clutter-free interface. A simple click on the Page Setup button opens a dialogue box that allows you to put in all of your basic page elements such as a page title, meta tag information and either a Strict or Transitional DOCTYPE. You even have the choice of entering Style definitions to change the appearance of the page scroll bars and background picture information. Once this has been completed, you’re given a blank XHTML document containing all the basic structural elements such as &lt;html&gt;, &lt;head&gt; and &lt;body&gt; tags. The only part of the initial page setup process that falls over is the fact that the XHTML namespace is not inserted into the &lt;html&gt; tag.</p><p>One of the most striking features of this program is that it has no file or context menus whatsoever; everything is accessed using the buttons at the top of the page. There are some interesting code wizards that insert various chunks of code, and switching between documents is easy enough using the Document drop-down box. The program also has an interesting color picker, accessible through the Pixel Information button.</p><p>There is also a drop-down box to switch between HTML and XHTML tags, giving you some of the more comment page elements that can be inserted with a single click of the appropriate button. This is a basic function in itself, but what makes it stand out is the fact that there is an additional selection in the drop-down box for the insertion of special character codes which can be used to correctly insert ampersand (&amp;), copyright (©) and a whole range of similar characters using their correct codes. There is a small degree of color coding offered, and it boasts the ever useful line numbering facility. Unfortunately, the software has absolutely no built-in validity checks at all.</p><p>I liked this program for its novel approach, and if you accept it as an ultra-stylish version of the standard Windows Notepad you won’t be disappointed, but the $40 registration fee does seem a little steep.</p><p><span style="color: #800000;"><strong>Evaluating XHTML Editors &#8211; HMTL Kit, Top Style Pro 3, and the rest</strong></span></p><p>HTML Kit (http://www.chami.com/html-kit/) offers a more professional feeling environment for your page authoring for the reasonable price of $55. It contains a vast array of tools and coding shortcuts, presented in a way reminiscent of a cut-down version of Dreamweaver. It has everything you’d expect from an application of this price including syntax highlighting, line numbering and a very useful Plugin Generator that acts as a kind of macro recorder to save commonly repeated tasks.</p><p>Perhaps one of the best features of this program is the built in Web browser that can submit the document you’re working on to the W3C online validator. There is also an interesting command-line function built into the main windows workspace that lets you type file commands instead of using the mouse to access menus. This is extensible as well, meaning you can add your own commands, and even includes a voice recognition feature enable you to issue commands by saying them out loud.</p><p>This is possibly the most customizable XHTML editor I have seen; the program also offers a very comprehensive online library of Plugins that allows you, for example, to extend the functionality of the software to incorporate advanced support for a multitude of Web programming languages, and to create your own menus, toolbars and templates.</p><p>Around the higher end of this category, Top Style Pro 3 from Bradbury Software (http://www.bradsoft.com/topstyle/index.asp) does not do a lot to justify the $80 licence cost. Sure the program works, but it doesn’t do anything that cheaper (even free) programs don’t do and it also doesn’t look any better than other XHTML editors.</p><p>In addition to these stand alone applications, there are other types of XHTML editors. There are several browser based versions including the prolifically available XStandard that is available from Belus Technology (http://xstandard.com/download.asp), which includes a freeware Lite version in addition to the corporate Pro version. The cheapest licence for the pro version is $179 and allows the program to be used by up to 10 users for 1 URL. This product is obviously aimed at high level corporate organisations, and the average developer can safely leave the Lite version alone.</p><p>Conclusion</p><p>As mentioned at the start of this article, there are not yet a great many XHTML editors around. I’ve focused solely on actual applications rather than any of the browser based versions simply because a wider number of people will find them useful. They are all stand-alone applications that can be used without any additional or special software, as opposed to the browser based versions, some of which require a Web server, PHP and MySQL to run. I have attempted to weed out the good and the bad and to explain why, and after looking at and using all of these applications myself, I can safely say that I see no reason why money need be spent at all when deciding to switch to an XHTML editor.</p>]]></content:encoded><wfw:commentRss>http://web.bearsols.com/development-design/web-authoring/evaluating-xhtml-editors-by-dan-wellman/feed</wfw:commentRss><slash:comments>0</slash:comments></item></channel></rss>
