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

How-To Tutorials

7018 Articles
article-image-oracle-webcenter-11g-portlets
Packt
21 Sep 2010
6 min read
Save for later

Oracle WebCenter 11g: Portlets

Packt
21 Sep 2010
6 min read
(For more resources on Oracle, see here.) Portlets, JSR-168 specification Specification JSR-168, which defines the Java technologies, gives us a precise definition of Java portlets: Portlets are web components—like Servlets—specifically designed to be aggregated in the context of a composite page. Usually, many Portlets are invoked to in the single request of a Portal page. Each Portlet produces a fragment of markup that is combined with the markup of other Portlets, all within the Portal page markup. You can see more detail of this specification on the following page: http://jcp.org/en/jsr/detail?id=168 While the definition makes a comparison with servlets, it is important to note that the portlets cannot be accessed directly through a URL; instead, it is necessary to use a page-like container of portlets. Consequently, we might consider portlets as tiny web applications that return dynamic content (HTML, WML) into a region of a Portal page. Graphically, we could view a page with portlets as follows: Additionally, we must emphasize that the portlets are not isolated from the rest of the components in the pages, but can also share information and respond to events that occur in other components or portlets. WSRP specification The WSRP specification allows exposing portlets as Web services. For this purpose, clients access portlets through an interface (*. wsdl) and get graphic content associated. Optionally, the portlet might be able to interact directly with the user through events ocurring on them. This way of invoking offers the following advantages: The portals that share a portlet centralize their support in a single point. The portlet integration with the portal is simple and requires no programming. The use of portlets, hosted on different sites, helps to reduce the load on servers. WebCenter portlets Portlets can be built in different ways, and the applications developed with Oracle WebCenter can consume any of these types of portlets. JSF Portlets: This type of portlet is based on a JSF application, which is used to create a portlet using a JSF Portlet Bridge. Web Clipping: Using this tool, we can build portlets declaratively using only a browser. These portlets show content from other sites. OmniPortlet: These portlets can retrieve information from different types of data sources (XML, CSV, database, and so on) to expose different ways of presenting things, such as tables, forms, charts, and so on. Content Presenter: This allows you to drop content from UCM on the page and display this content in any way you like or using a template. Ensemble: This is a way to "mashup" or produce portlets or "pagelets" of information that can be displayed on the page. Programmatic Portlets: Obviously, in addition to the previous technologies that facilitate the construction of portlets, it is also possible to build in a programmatic way. When we build in this way, we reach a high degree of personalization and control. However, we need specialized Java knowledge in order to program in this way. As we can see, there are several ways in which we can build a portlet; however, in order to use the rich components that the ADF Faces framework offers, we will focus on JSF Portlets. Developing a portlet using ADF The portlet that we will build will have a chart, which shows the status of the company's requests. To do this, we must create a model layer that represents our business logic and exposes this information in a page. Therefore, we are going to do the following steps: Create an ADF application. Develop business components. Create a chart page. Generate a portlet using the page. Deploy the portlet. In this example, we use a page for the construction of a portlet; however, ADF also offers the ability to create portlets based on a flow of pages through the use of ADF TaskFlows. You can find more information on the following link: http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/taskflows.htm#BABDJEDD Creating an ADF application To create the application, do the following steps: Go to JDeveloper. In the menu, choose the option File | New to start the wizard for creating applications. In the window displayed, choose the Application category and choose the Fusion Web Application ADF option and press the OK button. Next, enter the following properties for creating the application: Name: ParacasPortlet Directory: c:ParacasPortlet Application Package Prefix : com.paracasportlet Click Finish to create the application. Developing business components Before starting this activity, make sure you have created a connection to the database. In the project Palette, right-click on Project Model, and choose New. On the next page, select the category Business Tier | ADF Business Components and choose Business Components from Tables. Next, press the OK button. In the following page, you configure the connection to the database. At this point, select the connection db_paracas and press the OK button. In order to build a page with a chart, we need to create a read-only view. For this reason, don't change anything, just press the Next button. (Move the mouse over the image to enlarge.) In this next step, we can create updateable views. But, we don't need this type of component. So, don't change anything. Click the Next button. Now, we need to allow the creation of read-only views. We will use this kind of component in our page; therefore select the table REQUEST, as shown next and press Next. Our next step will allow the creation of an application module. This component is necessary to display the read-only view in the whole application. Keep this screen with the suggested values and click the Finish button. Check the Application Navigator. You must have your components arranged in the same way as shown in the following screenshot: Our query must determine the number of requests for status. Therefore, it will be necessary to make some changes in the created component. To start, double-click on the view RequestView, select the Query category, and click on the Edit SQL Query option as shown in the following screenshot: In the window shown, modify the SQL as shown next and click the OK button. SELECT Request.STATUS, COUNT(*) COUNT_STATUSFROM REQUEST RequestGROUP BY Request.STATUS We only use the attributes Status and CountStatus. For this reason, choose the Attributes category, select the attributes that are not used, and press Delete selected attribute(s) as shown in the following screenshot: Save all changes and verify that the view is similar to that shown next:
Read more
  • 0
  • 0
  • 4617

article-image-seo-kentico-cms-5
Packt
21 Sep 2010
5 min read
Save for later

SEO with Kentico CMS 5

Packt
21 Sep 2010
5 min read
(For more resources on CMS, see here.) Have a go hero – determine your keywords Search engines read, crawl, and index text and only text. They don't recognize images, Flash, or Silverlight content. That's why it's important to use the most relevant text for your website and sprinkle the content with the right keywords, while placing the selected keywords in strategic locations where there is a maximum chance for the spiders of a search engine to read, crawl, and index. Embedding keywords in the heading, initial part of the first paragraph, page titles, filenames, and directory names are some of the most commonly used strategies for improving page ranking. You can also consider including keyword phrases in the URLs or domain names of your website. This is one of the most important ways to improve the page ranking in various search engines' results pages. You need to be very careful when selecting the keywords for your website and choose words that describe your website. Sometimes, you may be confident that keywords that you choose are the best descriptions. But how do you know whether you have chosen the best keywords? What if there is no one out there who will submit a search query for the keywords you chose? This is where web analytis plays an important part. While it's tempting—resist the urge to go with uniquely different keywords or made up words. This may sound appealing to reduce the overlap with your competitor's websites. Unfortunately, you may find yourself not featured in any specific results at all. This is the main reason you should consider using keyword phrases that are popularly searched. There is a wide variety of keyword suggestion tools available, which can give you statistics, competition level, and search popularity that can help a company make an informed decision. While it is typical to determine a list of six keywords, depending on your marketing budget, you may only want to finalize a list of three. Spend some time with your marketing department to determine these keywords. Once this is done, validate these against several of the online keyword suggestion tools available. Finalize this list and make it available to all content editors with specific recommendations about their usage. Time for action – forbidden URL characters In order to guarantee URL consistency, HTTP defines a set of forbidden characters (' / : * ? " < > | & ; % . ; % . ' # [ ] + =.). In addition to these pre-defined characters, we want to remove the $ character from any URL string in our site to provide better navigation. This can be done using the following steps: Log in to Site Manager, select the Settings tab, select URLs and SEO, as shown in the following screenshot: (move cursor over image to enlarge) In the Forbidden URL characters field, enter $ and select Save, as shown in the following screenshot: Don't forgetThis setting defines characters in addition to the HTTP forbidden characters mentioned earlier. Log in to CMS Desk, select the News folder, and click the New document icon. In the New document screen, select the News item, enter the following information, and select Save. Sign out of CMS Desk. In the live site, select the News menu item, click the Get An IPhone for $50 link to view the URL containing the replaced characters, and the News item, as shown in the following screenshot: What just happened? When you selected the URLs and SEO menu option, this brought us to the system management screen. This screen contains a variety of options for managing various advanced aspects of the URL and SEO functions. When we entered the $ into the Forbidden URL characters field, this appended our character to the default HTTP forbidden list. Once this was saved, we then created a new news item that contained a $ in the title. By default, all new News URLs are created using the News title as the default URL. The resulting URL contained a - instead of a $. Time for action – changing the site name The name of any page displayed in the browser window is based on a system-wide default that starts with a page prefix. Now that we have our basic site configured, we want to change the name of the page prefix from Corporate Site to the name of our company, namely, Big Company, using the following steps: Log in to the live site to view the default site name, Corporate Site, as shown in the following screenshot: Log in to Site Manager, select the Settings tab, and then select Web site, as shown in the following screenshot: In the Site drop-down menu, select Corporate Site, as shown in the following screenshot: In the Web site properties for the Corporate Site, change the Page title prefix field to Big Company, as shown in the following screenshot and select Save. Log in to the live site to view the changed page prefix to our company name, as shown in the following screenshot: What just happened? When we selected the Web site and then Corporate Site, this brought up the default site settings. We then changed the Page title prefix field to our company name, and when we logged into the live site, this was reflected across all pages. This change is also captured by any search engines currently indexing our site. Global settingsYou can configure the format of all page titles, descriptions, and keywords for all sites by logging into Site Manager selecting Settings, then the Web site dialog, and then by selecting the (global) site. This allows you to configure the Page title format for all pages. The default title format is:{%prefix%} - {%pagetitle_orelse_name%} This means that the format consists of the site prefix followed by the page title value. If the page title value is not set, the document name is used.
Read more
  • 0
  • 0
  • 1792

article-image-moodle-20-whats-new-add-resource
Packt
20 Sep 2010
7 min read
Save for later

Moodle 2.0: What's New in Add a Resource

Packt
20 Sep 2010
7 min read
(For more resources on Moodle, see here.) New look – new wording Let's compare the former view of the Add a Resource drop-down menu with the new one. In the following screenshot, the left side shows us the Moodle 2.0 view and the right shows us the Moodle 1.9 view: The first thing to notice is that the wording is simpler –no more confusion amongst teachers as to what constitutes a web page as opposed to a text page; no more explanation needed that Display a directory actually just means Show a folder of my resources. The developers of Moodle 2.0 have taken onboard comments made by trainers and frequent users that certain terms were misunderstood by beginners. In the past, I myself have had to reassure newbies that even though they think they know nothing about web design, it is safe to select Compose a web page because doing so will simply bring up a text box where you can type your information or instructions straight into Moodle. Similarly, not everyone understands that a directory is just a fancy name for a folder that can house a number of your resources. This has now been made clearer. The selection Link to a file or web site has also been altered as these are now dealt with in two different ways. Let's take each option one at a time and study it in more depth. Adding a file The link File replaces the Moodle 1.9 Link to a file or web site option and is the place where, within your course, you would ordinarily upload and display files such as a Microsoft PowerPoint slideshow or a PDF resource. Selecting this from the drop-down gives us the editing screen, the top part of which is shown in the following screenshot: In our How to Be Happy course, our teacher, Andy, is going to upload an Open Office (odt) file with a tip a day for staying cheerful in February, a somewhat grim month in the Northern Hemisphere. Here's how we do it: For Name, as in earlier versions of Moodle, type the text you wish students to click on to access the resource. For Description, type a description which we can later decide to display or not. An Admin can set it so you aren't required to type a description. Click Add to start uploading the document – the File Picker appears: If it's not offered by default, click Upload this file… Add the author name and license type Then, as with Moodle 19, click Browse… to locate the document and then Upload this file… to upload it. You'll be returned to the main editing screen where the document appears as a blue link. As we scroll down, and with Advanced set to Show, we see other settings, some new, and some familiar from previous versions of Moodle but with extra functionality: Display: Choose how you want the file to appear and if you want the actual file name and/or its description to be shown. Advanced: With this enabled, you can decide the size of the pop up window and whether or not to filter the content Common Module settings: (as with Moodle 1.9) Decide whether to make the document visible or not and to set it for groups/groupings (which are now enabled by default) Restrict availability: This will only appear if the setting has been enabled in site administration and is a feature that lets you decide when and under what conditions the file may be accessed. Activity completion: This will only appear if you've enabled it in your course. It's a feature allowing students to check off what they have done or teachers to set activities to be automatically checked as complete under certain circumstances. Save: According to your preference, as with Moodle 1.9 Displaying a file As we went through the settings to upload and show our February Beat The Blues tips, we noticed a drop-down option Display. It gives a variety of ways a file such as our .odt document can appear on the course page in Moodle 2.0. How they display will depend on their file type. Display: Automatic Leave this as the default if you want Moodle to decide for you! In the case of Andy's slideshow, it's the traditional way of displaying an uploaded document, where once clicked on, it appears with a prompt box saying something like (depending on your browser) "do you want to open or save this file?" Display: Embed This will show the Moodle page with heading, blocks, and footer. It will show the title/description of the item and display the file directly in the page as well, so is good for videos, flash animations and so on. Display: Force download When a user clicks on the file, the web browser pops up with a "where do you want to save this file?" box. Display: Open This offers no Moodle heading, blocks, footer or description; it just shows the file as it is. Display: In pop-up This will cause the link to the file to appear in a pop up window before prompting you to open or download it. You can set the size of the pop up window on the Advanced settings page. Site administration | plugins | Activity modules | file gives us two other display options if so desired. These are: Display: In frame This will show the Moodle heading and the file description, with the file displayed in a resizable area below Display: New window This is very much like 'in pop-up', but the new window is a full browser window, with menus and address bar, and so on Resource administration If we click to update our file once it has been uploaded, we can see a new area in the Settings block, giving us options to manage this uploaded resource. We've seen this before: when clicking to update an item, we can tweak it from here. Let's take a look at these: Edit settings Here's where we update the details, display options, and so on (obviously!). Locally assigned roles and Permissions Moodle 1.9 gave us the facility to assign roles and permissions locally to an individual resource, so this is not new. In Moodle 2.0 the site administrator has more control over who can assign which roles by default. Check Permissions This is new however and enables to us be doubly certain our students are allowed (and not allowed!) to access what we want them to. Let's try an example: suppose Andy hides his February tips until the end of January but that he would like one particular student, Emma, to be able to access them in advance of time. He will allow her to view the February document even though it is hidden. He needs to ensure she doesn't have the right to see any other of the hidden files until the appropriate time. Here's what to do: In Locally assigned roles, give Emma the teacher role. This will allow her to view hidden activities, and therefore, our hidden February tips. In Check permissions, select Emma and click Show this user's permissions. This brings up a table showing what Emma's permissions are in this file. She can view hidden activities, and therefore, would be able to see the hidden February resource in advance of the other students. We see that because Emma's been assigned locally the role of teacher in our February document she is allowed to view the hidden file—but as she is still a student in the course as a whole, she doesn't have this right elsewhere –so we are safe!
Read more
  • 0
  • 0
  • 7509

article-image-all-new-drupal-books-packt
Packt
20 Sep 2010
2 min read
Save for later

All New Drupal Books from Packt

Packt
20 Sep 2010
2 min read
Drupal 7 Themes Create new themes for your Drupal 7 site with a clean layout and powerful CSS styling Drupal Intranets With Open Atrium Discover an intranet solution for your organization with Open Atrium                                                                   Drupal 7 Module Development Create your own Drupal 7 modules from scratch                                                             Drupal Web Services Integrate social and multimedia Web services and applications with your Drupal Web site. Drupal 6 Theming Cookbook Over 100 clear step-by-step recipes to create powerful, great-looking Drupal themes   Upcoming Drupal Books... Drupal 7 Social Networking: RAW Build a social or community website with friends lists, groups, custom user profiles, and much more Drupal 7 Fields/CCK Beginner's Guide Explore Drupal 7 fields/CCK and master their use To see the full range of Packt Drupal Books click here
Read more
  • 0
  • 0
  • 1288

article-image-guide-migrating-data-cloud
Packt
20 Sep 2010
3 min read
Save for later

A Guide for Migrating Data to the Cloud

Packt
20 Sep 2010
3 min read
(For more resources on this subject, see here.) Planning While planning is of course the first step, this is something that any IT shop should not take lightly since this is the step where you decide what vendor to go with. All cloud vendors have snazzy marketing material that tell you how seamless and highly functional a migration will be, but that simply cannot always be guaranteed. How many times have you been sold on a technology in the past that did not live up to expectations? It happens more often than you think, and it is part of the overall sales process by these companies. Instead of relying on their word, you could consider a few options. One would be to work with a company you have experience with. If you’re familiar with working with Microsoft, go with their Azure platform. If you’re already using Salesforce to some degree, continue to talk with them about a more full-scale migration. If you’re planning on working with a non-traditional vendor such as Amazon or Google, ask for references or do a bit of investigating on your own. You might learn a thing or two. Security Keeping data secure is of course very important, and it’s wise to make an assessment of your security prior to any sort of large-scale migration. Performing audits and stress tests are a great way to make sure that your organization and/or system is ready for a large scale change. The unfortunate reality to any sort of migration is that there are inevitable vulnerabilities to any large scale process such as this. With that being said, the more you know about your strengths and weaknesses prior to a cutover, the better off you will be. Any sort of large project is sure to experience bumps in the road, and you might as well prepare yourself for uncomfortable findings prior to commencement. Testing At this point, you’ve already made some critical decisions, but hopefully you’ve reached a testing stage where you will be able to take a look at more than one provider for assessment of what they can do for your organization. Having the redundancy to fall back on a "plan B" in case one provider doesn’t work out is ideal. You may not have that option depending on your particular deployment, but again it’s a more productive scenario. Deployment After the testing point, you’ve reach deployment. If the planning, security and testing phases have proven to be successful (at least optimistically so) you’ll probably realize that cloud deployments require more re-engineering and code changes than any vendor is willing to tell you. Moving an environment outside of your own hosted space takes a lot more in-house development than most people realize. Summary In the long run, however, cloud services are beneficial to both the vendor and the customer. What headaches that go into cloud migration usually pay off over time. Perhaps you might not see the immediate benefit, but once a deployment is successful, the amount of time and money that is saved by adopting a cloud strategy clearly makes all the hard work required worth. Perseverance is key, and in time it’s easy to see the overall benefits. Further resources on this subject: Hands-on Tutorial for Getting Started with Amazon SimpleDB Ground to SQL Azure migration using MS SQL Server Integration Services Microsoft LightSwitch Application using SQL Azure Database
Read more
  • 0
  • 0
  • 2750

article-image-installing-and-setting-javafx-netbeans-and-eclipse-ide
Packt
17 Sep 2010
7 min read
Save for later

Installing and Setting up JavaFX for NetBeans and Eclipse IDE

Packt
17 Sep 2010
7 min read
(For more resources on JavaFX, see here.) Introduction Today, in the age of Web 2.0, AJAX, and the iPhone, users have come to expect their applications to provide a dynamic and engaging user interface that delivers rich graphical content, audio, and video, all wrapped in GUI controls with animated cinematic-like interactions. They want their applications to be connected to the web of information and social networks available on the Internet. Developers, on the other hand, have become accustomed to tools such as AJAX/HTML5 toolkits, Flex/Flash, Google Web Toolkit, Eclipse/NetBeans RCP, and others that allow them to build and deploy rich and web-connected client applications quickly. They expect their development languages to be expressive (either through syntax or specialized APIs) with features that liberate them from the tyranny of verbosity and empower them with the ability to express their intents declaritively. The Java proposition During the early days of the Web, the Java platform was the first to introduce rich content and interactivity in the browser using the applet technology (predating JavaScript and even Flash). Not too long after applets appeared, Swing was introduced as the unifying framework to create feature-rich applications for the desktop and the browser. Over the years, Swing matured into an amazingly robust GUI technology used to create rich desktop applications. However powerful Swing is, its massive API stack lacks the lightweight higher abstractions that application and content developers have been using in other development environments. Furthermore, the applet's plugin technology was (as admitted by Sun) neglected and failed in the browser-hosted rich applications against similar technologies such as Flash. Enter JavaFX The JavaFX is Sun's (now part of Oracle) answer to the next generation of rich, web-enabled, deeply interactive applications. JavaFX is a complete platform that includes a new language, development tools, build tools, deployment tools, and new runtimes to target desktop, browser, mobile, and entertainment devices such as televisions. While JavaFX is itself built on the Java platform, that is where the commonalities end. The new JavaFX scripting language is designed as a lightweight, expressive, and a dynamic language to create web-connected, engaging, visually appealing, and content-rich applications. The JavaFX platform will appeal to both technical designers and developers alike. Designers will find JavaFX Script to be a simple, yet expressive language, perfectly suited for the integration of graphical assets when creating visually-rich client applications. Application developers, on the other hand, will find its lightweight, dynamic type inference system, and script-like feel a productivity booster, allowing them to express GUI layout, object relationship, and powerful two-way data bindings all using a declarative and easy syntax. Since JavaFX runs on the Java Platform, developers are able to reuse existing Java libraries directly from within JavaFX, tapping into the vast community of existing Java developers, vendors, and libraries. This is an introductory article to JavaFX. Use its recipes to get started with the platform. You will find instructions on how to install the SDK and directions on how to set up your IDE. Installing the JavaFX SDK The JavaFX software development kit (SDK) is a set of core tools needed to compile, run, and deploy JavaFX applications. If you feel at home at the command line, then you can start writing code with your favorite text editor and interact with the SDK tools directly. However, if you want to see code-completion hints after each dot you type, then you can always use an IDE such as NetBeans or Eclipse to get you started with JavaFX (see other recipes on IDEs). This section outlines the necessary steps to set up the JavaFX SDK successfully on your computer. These instructions apply to JavaFX SDK version 1.2.x; future versions may vary slightly. Getting ready Before you can start building JavaFX applications, you must ensure that your development environment meets the minimum requirements. As of this writing, the following are the minimum requirements to run the current released version of JavaFX runtime 1.2. Minimum system requirements How to do it... The first step for installing the SDK on you machine is to download it from http://javafx.com/downloads/. Select the appropriate SDK version as shown in the next screenshot. Once you have downloaded the SDK for your corresponding system, follow these instructions for installation on Windows, Mac, Ubuntu, or OpenSolaris. Installation on Windows Find and double-click on the newly downloaded installation package (.exe file) to start. Follow the directions from the installer wizard to continue with your installation. Make sure to select the location for your installation. The installer will run a series of validations on your system before installation starts. If the installer finds no previously installed SDK (or the incorrect version), it will download a SDK that meets the minimum requirements (which lengthens your installation). Installation on Mac OS Prior to installation, ensure that your Mac OS meets the minimum requirements. Find and double-click on the newly downloaded installation package (.dmg file) to start. Follow the directions from the installer wizard to continue your installation. The Mac OS installer will place the installed files at the following location:/Library/Frameworks/JavaFX.framework/Versions/1.2. Installation on Ubuntu Linux and OpenSolaris Prior to installation, ensure that your Ubuntu or OpenSolaris environment meets the minimum requirements. Locate the newly downloaded installation package to start installation. For Linux, the file will end with *-linux-i586.sh. For OpenSolaris, the installation file will end with *-solaris-i586.sh. Move the file to the directory where you want to install the content of the SDK. Make the file executable (chmod 755) and run it. This will extract the content of the SDK in the current directory. The installation will create a new directory, javafx-sdk1.2, which is your JavaFX home location ($JAVAFX_HOME). Now add the JavaFX binaries to your system's $PATH variable, (export PATH=$PATH:$JAVAFX_HOME/bin). When your installation steps are completed, open a command prompt and validate your installation by checking the version of the SDK. $> javafx -version$> javafx 1.2.3_b36 You should get the current version number for your installed JavaFX SDK displayed. How it works... Version 1.2.x of the SDK comes with several tools and other resources to help developers get started with JavaFX development right away. The major (and more interesting) directories in the SDK include: Setting up JavaFX for the NetBeans IDE The previous recipe shows you how to get started with JavaFX using the SDK directly. However if you are more of a syntax-highlight, code-completion, click-to-build person, you will be delighted to know that the NetBeans IDE fully supports JavaFX development. JavaFX has first-class support within NetBeans, with functionalities similar to those found in Java development including: Syntax highlighting Code completion Error detection Code block formatting and folding In-editor API documentation Visual preview panel Debugging Application profiling Continuous background build And more... This recipe shows how to set up the NetBeans IDE for JavaFX development. You will learn how to configure NetBeans to create, build, and deploy your JavaFX projects. Getting ready Before you can start building JavaFX applications in the NetBeans IDE, you must ensure that your development environment meets the minimum requirements for JavaFX and NetBeans (see previous recipe Installing the JavaFX SDK for minimum requirements). Version 1.2 of the JavaFX SDK requires NetBeans version 6.5.1 (or higher) to work properly. How to do it... As a new NetBeans user (or first-time installer), you can download NetBeans and JavaFX bundled and ready to use. The bundle contains the NetBeans IDE and all other required JavaFX SDK dependencies to start development immediately. No additional downloads are required with this option. To get started with the bundled NetBeans, go to http://javafx.com/downloads/ and download the NetBeans + JavaFX bundle as shown in the next screenshot (versions will vary slightly as newer software become available).
Read more
  • 0
  • 0
  • 20291
Unlock access to the largest independent learning library in Tech for FREE!
Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
Renews at €18.99/month. Cancel anytime
article-image-microsoft-dynamics-nav-2009-development-tools
Packt
17 Sep 2010
7 min read
Save for later

Microsoft Dynamics NAV 2009 Development Tools

Packt
17 Sep 2010
7 min read
(For more resources on Microsoft Dynamics, see here.) NAV process flow Primary data such as sales orders, purchase orders, production orders, financial transactions, job transactions, and so on flow through the NAV system as follows: Initial Setup: Entry of essential Master data, reference data, control and setup data. Much of this preparation is done when the system (or a new application) is first set up for production use. Transaction Entry: Transactions are entered into a Journal table; data is preliminarily validated as it is entered, master and auxiliary data tables are referenced as appropriate. Entry can be manual keying, an automated transaction generation process, or an import function which brings transaction data in from another system. Validate: Provide for additional test validations of data prior to submitting the batch to Posting. Post: Post the Journal Batch, completing transaction data validation, adding entries as appropriate to one or more Ledgers, including perhaps a register and a document history. Utilize: Access the data via Forms and/or Reports of various types as appropriate. At this point, total flexibility exists. Whatever tools are available and are appropriate for users' needs should be used. There are some very good tools built into NAV for data manipulation, extraction, and presentation. In the past, these capabilities were considered good enough to be widely accepted as full Online Analytical Processing (OLAP) tools. Maintenance: Continue maintenance of Master data, reference data, and setup and control data, as appropriate. The loop returns to the beginning of this data flow sequence. The preceding image provides a simplified picture of the flow of application data through a NAV system. Many of the transactions types have additional reporting, more ledgers to update, or even auxiliary processing. However, this is the basic data flow followed whenever a Journal and Ledger table are involved. Data preparation Prepare all the Master data, reference data, and control and setup data. Much of this preparation is done initially, when an application is first set up for production usage. Naturally, this data must be maintained as new Master data becomes available, as various system operating parameters change, and so on. The standard approach for NAV data entry allows records to be entered that have just enough information to define the primary key fields, but not necessarily enough to support processing. This allows a great deal of flexibility in the timing and responsibility for entry and completeness of new data. This system design philosophy allows initial and incomplete data entry by one person, with validation and completion to be handled later by someone else. For example, a sales person might initialize a new customer entry with name, address, and phone number, saving the entry with just the data entered to which they have access. At this point, there is not enough information recorded to process orders for this new customer. At a later time, someone in the accounting department can set up posting groups, payment terms, and other control data that should not be controlled by the sales department. This additional data may make the new customer record ready for production use. As in many instances data comes into an organization on a piecemeal basis, the NAV approach allows the system to be updated on an equally piecemeal basis providing a flexible user friendliness many accounting-oriented systems lack. Transactions entry Transactions are entered into a Journal table; data is preliminarily validated as it is entered, master and auxiliary data tables are referenced as appropriate. NAV uses a relational database design approach that could be referred to as a "rational normalization". NAV resists being constrained by the concept of a normalized data structure, where any data element appears only once. The NAV data structure is normalized so long as that principle doesn't get in the way of processing speed. Where processing speed or ease of use for the user is improved by duplicating data across tables, NAV does so. At the point where Journal transactions are entered, a considerable amount of data validation takes place. Most, if not all, of the validation that can be done is done when a Journal entry is made. These validations are based on the combination of the individual transaction data plus the related Master records and associated reference tables (for example lookups, application or system setup parameters, and so on). Here also you find the philosophy of allowing entries, which are incomplete and not totally ready for processing, to be made. Testing and Posting the Journal batch Any additional validations that need to be done to ensure the integrity and completeness of the transaction data prior to being Posted are done either in pre-Post routines or directly in the course of the Posting processes. The actual Posting of the Journal batch occurs when the transaction data has been completely validated. Depending on the specific application function, when Journal transactions don't pass muster during this final validation stage, either the individual transaction is bypassed while acceptable transactions are Posted, or the entire Journal Batch is rejected until the identified problem is resolved. The Posting process adds entries as appropriate to one or more Ledgers and sometimes a document history. When a Journal Entry is Posted to a Ledger, it becomes a part of the permanent accounting record. Most data cannot be changed or deleted once it is resident in a Ledger except by a subsequent Posting process. During the Posting process, Register tables are also updated showing what transaction entries (by ID number) were posted when and in what batches. This adds to the transparency of the NAV application system for audits and analysis. In general, NAV follows the standard accounting practice of requiring Ledger corrections to be made by Posting reversing entries, rather than deletion of problem entries. The overall result is that NAV is a very auditable system, a key requirement for a variety of government, legal, and certification requirements for information systems. Accessing the data The data in a NAV system can be accessed via Pages and/or Reports of various types as appropriate, providing total flexibility. Whatever tools are available to the developer or the user, and are appropriate, should be used. There are some very good tools in NAV for data manipulation, extraction, and presentation. Among other things, these include the SIFT/Flowfield functionality, the pervasive filtering capability (including the ability to apply filters to subordinate data structures), and the Navigate function. NAV 2009 added the ability to create page parts for graphing,with a wide variety of predefined graph page parts included as part of the standard distribution. You can create your own chart parts as well, but that discussion is outside the scope of this book. There is an extended discussion and some tools available in the NAV Blog community. There are a number of methods by which data can be pushed or pulled from an NAV database for processing and presentation outside NAV. These allow use of more sophisticated graphical displays, or the use of other specialized data analysis tools such as Microsoft Excel or various Business Intelligence (BI) tools. Ongoing maintenance As with any database-oriented application software, ongoing maintenance of Master data, reference data, and setup and control data is required, as appropriate. Of course at this point, the cycle of processing returns to the first step of the data flow sequence, Data Preparation.
Read more
  • 0
  • 0
  • 2563

article-image-code-analysis-and-debugging-tools-microsoft-dynamics-nav-2009
Packt
17 Sep 2010
10 min read
Save for later

Code Analysis and Debugging Tools in Microsoft Dynamics NAV 2009

Packt
17 Sep 2010
10 min read
(For more resources on Microsoft Dynamics, see here.) The NAV tools and techniques that you use to determine what code to modify and to help you debug modifications are essentially the same. The goal in the first case is to focus on your modifications, so that you have the minimum effect on the standard code. This results in multiple benefits. Smaller pieces of well focused code are easier to debug, easier to document, easier to maintain, and easier to upgrade. As of NAV's relatively tight structure and unique combination of features, it is not unusual to spend significantly more time in determining the right way to make a modification than it actually takes to code the modification. Obviously this depends on the type of modification being made. Unfortunately, the lack of documentation regarding the internals of NAV also contributes to an extended analysis time required to design modifications. The following sections review some of the tools and techniques you can use to analyze and test. Developer's Toolkit To paraphrase the introduction in the NAV Developer's Toolkit documentation, the Toolkit is designed to help you analyze the source code. This makes it easier to design and develop application customizations and to perform updates. The Developer's Toolkit is not part of the standard product distribution, but is available to all Microsoft Partners for NAV for download from the Partner website. While it takes a few minutes to set up the Developer's Toolkit for the database on which you will be working, the investment is worthwhile. Follow the instructions in the Developer's Toolkit manual for creating and loading your Toolkit database. The Help files in the Developer's Toolkit are also useful. As of late 2009, the current NAV Developer's Toolkit is V3.00. V3.00 does not deal with the new features of NAV 2009 associated with the Role Tailored Client or three tier functionality. The NAV Developer's Toolkit has two major categories of tools—the Compare and Merge Tools, and the Source Analyzer: The Compare and Merge Tools are useful anytime you want to compare a production database's objects to an unmodified set of objects to identify what has been changed. This might be in the process of upgrading the database to a new version or simply to better understand the contents of a database when you are about to embark on a new modification adventure. The Source Analyzer tools are the more general purpose set of tools. Once you have loaded the source information for all your objects into the Developer's Tools database, you will be able to quickly generate a variety of useful code analyses. The starting point for your code analyses will be the Object Administrator view as shown in the following screenshot: When you get to this point, it's worthwhile experimenting with various menu options for each of the object types to get comfortable with the environment and how the tools work. Not only are there several tool options, but multiple viewing options. Some will be more useful than others depending on the specifics of the modification task you are addressing as well as your working habits. Relations to Tables With rare exceptions, table relations are defined between tables. The Toolkit allows you to select an object and request analysis of the defined relations between elements in that object and various tables. As a test of how the Relations to Tables analysis works, we will expand our Table entry in the Object Administrator to show all the tables. Then we will choose the Location table, right-click, and choose the option to view its Relations to other Tables with the result shown in the following screenshot: If we want to see more detail, we can right-click on the Location table name in the right window, choose the Expand All option, and see the results as shown in the following screenshot: This shows us the Relations to Tables, with the relating (from) field and the related (to) field both showing in each line. Relations from Objects If you are checking to see what objects have a relationship pointing back to a particular table (the inverse of what we just looked at), you can find that out in essentially the same fashion. Right-click on the table of interest and choose the Relations from Objects option. If you wanted to see both sets of relationships in the same display, you can right-click on the table name in the right window and choose the Relation to Tables option. At that point your display will show both sets of relationships as shown in the following screenshot for the table Reservation Entry: Source Access On any of these screens you could select one of the relationships and drill down further into the detail of the underlying C/AL code. There is a search tool, the Source Finder. When you highlight one of the identified relationships and access the Code Viewer, the Toolkit will show you the object code where the relationship is defined. Where Used The Developer's Toolkit contains other tools that are also quite valuable to you as a developer. The idea of Where Used is fairly simple: list all the places where an element is used within the total library of source information. There are two different types of Where Used. The Toolkit's first type of Where Used is powerful because it can search for uses of whole tables or key sequences or individual fields. Many developers also use other tools (primarily developer's text editors) to accomplish some of this. However, the Developer's Toolkit is specifically designed for use with C/AL and C/SIDE. The second type of "Where Used" is Where Used With. This version of the Toolkit Where Used tool allows you to focus the search. Selecting the Where Used With Options brings up the screen in the following screenshot. As you can see, the degree of control you have over the search is extensive. Screenshots of the other three tabs of the Where Used With Options form follow: Trying it out To really appreciate the capabilities and flexibilities of the Developer's Toolkit, you must work with it to address a real-life task. For example, what if your firm was in a market where the merger of firms was a frequent occurrence? In order to manage this, the manager of accounting might decide that the system needs to be able to merge the data for two customers, including accounting and sales history under a single customer number. If you do that, you must first find all the instances of the Customer No. referenced in keys of other tables. The tool to do this in the Developer's Toolkit is the Source Finder. Calling up the Source Finder, first you Reset all fields by clearing them. Then enter the name of the field you are looking for, in this case that is Customer No., as shown in the following screenshot: Now specify you are only looking for information contained in Tables, as shown in the following screenshot: Next, specify that the search should only be in Keys, as shown in the following screenshot: Your initial results will look like those in the following screenshot: This data can be further constrained through the use of Filters (for example to find only Key 1 entries) and can be sorted by clicking on a column head. Of course, as mentioned earlier, it will help you to experiment along the way. Don't make the mistake of thinking the Developer's Toolkit is the only tool you need to use. At the same time, don't make the mistake of ignoring this tool just because it won't do everything. Working in exported text code As mentioned a little earlier, some developers export objects into text files, then use a text editor to manipulate them. Let us take a look at an object that has been exported into text and imported into a text editor. We will use one of the tables that are part of our ICAN development, the Donor Type table, 50001 as shown in the following screenshot: The general structure of all exported objects is similar, with differences that you would expect for the different objects. For example, Table objects have no Sections, but Report objects do. You can also see here that this particular table contains no C/AL-coded logic, as those statements would be quoted in the text listing. You can see by looking at this table object text screenshot that you could easily search for instances of the string Code throughout the text export of the entire system, but it would be more difficult to look for references to the Donor Type form/page, Form50002. And, while you can find the instances of Code with your text editor, it would be quite difficult to differentiate those instances that relate to the Donor Type table from those in any other table. This includes those that have nothing to do with our ICAN system enhancement, as well as those simply defined in an object as Global Variables. However, the Developer's Toolkit can make that differentiation. If you were determined to use a text editor to find all instances of "Donor Type".Code, you could do the following: Rename the field in question to something unique. C/SIDE will rename all the references to this field. Then export all the sources to text followed by using your text editor (or even Microsoft Word) to find the unique name. You must either remember to return the field in the database to the original name or you must be working in a temporary "work copy" of the database, which you will shortly discard. Otherwise, you will have quite a mess. One task that needs to be done occasionally is to renumber an object or to change a reference inside an object that refers to a no longer existing element. The C/SIDE editor may not let you do that easily, or in some cases, not at all. In such a case, the best answer is to export the object into text, make the change there and then import it back in as modified. Be careful though. When you import a text object, C/SIDE does not check to see if you are overwriting another instance of that object number. C/SIDE makes that check when you import a fob (that is a compiled object) and warns you. If you must do renumbering, you should check the NAV forums on the Internet for the renumbering tools that are available there. Theoretically, you could write all of your C/AL code with a text editor and then import the result. Given the difficulty of such a task and the usefulness of the tools embedded in C/SIDE, such an approach would be foolish. However, there are occasions when it is very helpful to simply view an object "flattened out" in text format. In a report where you may have overlapping logic in multiple data items and in several control triggers as well, the only way to see all the logic at once is in text format. You can use any text editor you like, Notepad or Word or one of the visual programming editors; the exported object is just text. You need to cope with the fact that when you export a large number of objects in one pass, they all end up in the same text file. That makes the exported file relatively difficult to use. The solution is to split that file into individual text files, named logically, one for each NAV object. There are several freeware tools to do just that, available from the NAV forums on the Internet. Two excellent NAV forums are www.mibuso.com and www.dynamicsuser.net.
Read more
  • 0
  • 0
  • 5020

article-image-bpmn-20-concepts-and-sales-quote-process
Packt
17 Sep 2010
6 min read
Save for later

BPMN 2.0 Concepts and The Sales Quote Process

Packt
17 Sep 2010
6 min read
(For more resources on Oracle, see here.) BPMN 2.0 concepts BPMN stands for Business Process Modeling Notation and is a public standard maintained by OMG. It describes a business-friendly, flow chart-like graphical notation that business process analysts and business users can use to model business processes and has support for process interactions, exception handling, compensation semantics, and so on. It is widely accepted by both commercial and open source BPMS tooling vendors. It is highly adaptable and can be used to capture everything from abstract process outlines to detailed process flows to implementation ready processes. One of the main value propositions of BPMN besides being a diagram standard is the precise semantics behind the diagram. The shape, the symbols (also referred to as markers), the borders, the placement of the BPMN diagram elements, as well as their properties have well defined meanings and have to be interpreted in the same manner by all tools. While BPMN 1.1 comprehensively addresses process modeling notations, it's failure to address an interchange format (for diagram exchange) has resulted in implementation vendors adopting different standards (BPEL, XPDL, other proprietary formats) to store BPMN process models leading to not only a loss of portability across tools but also making it difficult to communicate across the various stakeholders. The vision of BPMN is to have a single specification for notation, metamodel, and interchange. In addition, BPMN 2.0 has been expanded to include orchestrations and choreography of process models. Salient enhancements to BPMN 2.0 are as follows: BPMN 2.0 includes both diagram interchange as well as model interchange (the interchange formats can be either XML or UML) enabling portability of BPMN models across tool vendors. Formal execution semantics for all BPMN elements—BPMN 2.0 can not only be used to capture process models but can be used as an implementation model as well. IT simply layers the process execution details on top of the business process model leading to effective business-IT collaboration. Historically, business process models developed by business people have been technically separated from the process representations required by systems designed to implement and execute those processes. Thus, there was a need to manually translate the original business process models to the execution models. Vendors used standards such as BPEL and XPDL to save as well as execute BPMN Process models. Such translations are subject to errors and the impedance mismatch made it difficult for the process model and the executable process to be in sync with each other, as changes were made to both during the process development life cycle. With BPMN 2.0, there is no translation involved and the model is the implementation as well. Defines an extensibility mechanism for both Process model extensions and graphical extension. Refines event composition and correlation. Extends the definition of human interactions and aligns BPEL4People with the BPMN specification. Defines a Choreography model. A quick introduction to BPMN At its heart, BPMN has only three main elements, also referred to as Flow Objects—Activity (rectangle), Events (circle), and Gateways (diamond). An Activity represents some work done; Gateway represents a decision point or parallel forking or merge or join; Event represents either a trigger generated by the process or received by the process (from external source or from some other part of the process). These Flow Objects are linked by connections referred to as Sequential Flows. These Sequential Flows represent the chronological sequence of process steps. The preceding steps pass control to the following step(s) along the connection. The data is also passed along the connection flow. The Activity can be either a Task (an atomic process step) or Embedded Sub- process (compound process step). The Embedded Sub-Process can be either expanded or collapsed and has access to the process data. BPMN 2.0 supports different flavors of Tasks, namely: User Task for a human step managed by the workflow component of the BPM run-time engine; Manual Task for a human step that is not managed by the BPM run-time engine); Service Task for synchronous system interactions; Send Task and Receive Task for asynchronous system interactions; Script Task for scripting needs; Call Task for invoking another BPMN process (process chaining). The different task types have different symbols or markers to visually distinguish them. In BPMN, the lane objects are used to group activities based on the categories (can be human resources or system resources) that they are associated for better visualization purpose. In Oracle BPM Studio, the lanes are associated with the BPM Role object and the Performer of the User Task is automatically set to the BPM Role object associated with the lane. The User Task is associated with Process Participants or Performers who represent the business users who need to carry out the User Task. The associated Task (work to be performed) is shown in the inbox of the assigned Performers when the User Task is triggered. The actual work is performed only when the Performer executes on his Task. The Task is presented to the Performers through a browser-based worklist application. In BPM Studio the Process Participant or Performer is a BPM Role object in the Organization model. Oracle BPM Suite supports out-of-the-box workflow patterns. Workflow patterns allow users to declaratively specify approval chains, notifications, and escalation and expiration policies. This simplifies the process logic by encapsulating approval chains within reusable task components. It is always possible to model the approval pattern using simple Tasks, Gateways, and Events within the BPMN process—but for many processes it is more convenient to define workflow patterns as well as notification, expiration, and escalation policies as part of the user task definition. BPM Studio exposes these workflow patterns through six flavors of Interactive Tasks. The User Task refers to the Single Approver pattern and the participant or assignee is the member of the Role associated with the BPMN Process swim lane. The Management Task refers to the sequential management pattern and there are multiple participants assigned to the Task in a sequential pattern. Further, these participants are based on the Management hierarchy defined as part of LDAP and have the notion of a starting participant as well as the number of levels to be traversed up the management chain from the starting participant. The Group Task refers to the Parallel Voting pattern and the participants are members of the Role associated with the BPMN Process swim lane. The tasks are assigned in parallel to the participants in this case and the task is completed when a percentage of defined voting outcomes are reached. The FYI Task refers to the notification pattern and the participants are based on the Role associated with the BPMN Process swim lane. The task is completed as soon as the work items are assigned to the Task Inbox of the participants. Finally, the Complex Task for complex patterns involving task chaining and in this case the participants are not tied to the BPMN Process swim lanes.
Read more
  • 0
  • 0
  • 7615

Packt
17 Sep 2010
4 min read
Save for later

Sharing Content in WordPress Top Plugins—A Sequel

Packt
17 Sep 2010
4 min read
(For more resources on WordPress see here.) Feedburner Feedsmith By Steve Smith & Feedburner (http://feedburner.com/) Why it's awesome: Never having to worry about nefarious uses of your RSS feeds Why it was picked: Built by the Google crew at Feedburner Manual Install URL: http://www.google.com/support/feedburner/bin/answer.py?hl=en&answer=78483 Automatic Install search term: Not available Geek level: Webmaster Configuration location: Settings | Feedburner Used in: Feeds Many times, hosting your own RSS feed can wreak havoc on your server without you ever knowing it. Due to RSS's out-of-sight-out-of-mind style, you often forget about it completely. Using Google's Feedburner is one way to ensure that a swarm of subscribers won't bring your server to a crawl. Feedburner acts like a conduit to your RSS feed by delivering the feeds from Google's servers instead of your own. Not only does Feedburner offload your server traffic, it also gives you an amazing view of what people are doing with your feed. The stats alone are worth signing up. Burning your feed Submitting your feed to Google will take only a few minutes, but the rewards are long lasting. Create a Google account You will need to have a Google account to leverage Feedburner. If you do not already have an account with Google, you can sign up at https://www.google.com/accounts/NewAccount Verify your blog's feed URL Each WordPress blog comes with RSS feeds enabled. To access your feed, go to http://yourdomain.com/feed/ Burn your feed Now we must set up a new feed to burn by visiting http://feedburner.google.com and adding our feed to the Burn a feed right this instant input box. Name your feed Once you have added your feed, you will need to name the feed and create a URL to use it. Your feed title should be something descriptive about your blog, as this is what all of your RSS subscribers will see as the title of your blog. Configuring WP-Feedburner Now that you have your feed hosted on Google, we can finish the process of setting up WP-Feedburner. WP-Feedburner's configuration is located in Settings | WP Feedburner. Your feed should now be officially set up to redirect to your Feedburner feed. To make sure everything is working properly, visit http://yourdomain.com/feed/ and check that the URL gets redirected automatically to the Feedburner URL that you set up earlier. SendIt By Giuseppe Surace (http://www.giuseppesurace.com/) Why it's awesome: Send e-mail campaigns for free Why it was picked: Easy to set up and free WARNING: This plugin is still in the beta stage, but the majority of the functionality works great. Manual Install URL: http://wordpress.org/extend/plugins/sendit/ Automatic Install search term: SendIt Geek level: WP Ninja Configuration location: Top Navigation Newsletter| Used in: Newsletters SendIt has more potential to change the way you communicate with your readers than any other plugin mentioned in this book. SendIt was originally written in Italian, and every once in a while, you will stumble on to a few words that are yet to be translated. However, besides the occasional Italian noun, SendIt is very straightforward and makes running multiple newsletters as easy as managing your blog. SendIt overview Unlike other plugins, SendIt is a fairly large plugin with multiple configuration pages and areas to set up, tweak, and perfect. Newsletter: Compose and send your newsletters from the Newsletter section Manage subscribers: Add and remove e-mail addresses from a given newsletter SMTP settings: If you are planning on using SendIt to send to more than 600 subscribers, you might want to consider setting up an external SMTP server for sending your mail. Otherwise, you can leave this section alone Newsletter settings: Find, delete, and edit newsletters Import emails from comments: Quickly build e-mail lists from everyone who has commented on different blog posts Import emails from WP Users: Quickly build e-mail lists from other writers, users, and administrators on your blog Creating your first newsletter For the purpose of this example, we will create a Geek Newsletter for our blog readers to subscribe to. Start by visiting Newsletter | Newsletter Settings. Click Create New List. A new list will automatically be added to your Available Lists grid. Select Edit from the newly created list. Define the From e-mail address, newsletter name, and the header and footer for this newsletter template. The header and footer will automatically be applied for each e-mail you send from this mailing list. Click Save.
Read more
  • 0
  • 0
  • 1690
article-image-content-based-routing-microsoft-platform
Packt
16 Sep 2010
9 min read
Save for later

Content Based Routing on Microsoft Platform

Packt
16 Sep 2010
9 min read
Use case McKeever Technologies is a medium-sized business, which manufactures latex products. They have recently grown in size through a series of small acquisitions of competitor companies. As a result, the organization has a mix of both home-grown applications and packaged line-of-business systems. They have not standardized their order management software and still rely on multiple systems, each of which houses details about a specific set of products. Their developers are primarily oriented towards .NET, but there are some parts of the organization that have deep Java expertise. Up until now, orders placed with McKeever Technologies were faxed to a call center and manually entered into the order system associated with the particular product. Also, when customers want to discover the state of their submitted order, they are forced to contact McKeever Technologies' call center and ask an agent to look up their order. The company realizes that in order to increase efficiency, reduce data entry error, and improve customer service they must introduce some automation to their order intake and query processes. McKeever Technologies receives less than one thousand orders per day and does not expect this number to increase exponentially in the coming years. Their current order management systems have either Oracle or SQL Server database backends and some of them offer SOAP service interfaces for basic operations. These systems do not all maintain identical service-level agreements; so the solution must be capable of handling expected or unexpected downtime of the target system gracefully. The company is looking to stand up a solution in less than four months while not introducing too much additional management overhead to an already over-worked IT maintenance organization. The solution is expected to live in production for quite some time and may only be revisited once a long-term order management consolidation strategy can be agreed upon. Key requirements The following are key requirements for a new software solution: Accept inbound purchase requests and determine which system to add them to based on which product has been ordered Support a moderate transaction volume and reliable delivery to target systems Enable communication with diverse systems through either web or database protocols. Additional facts The technology team has acquired the following additional facts that will shape their proposed solution: The number of order management systems may change over time as consolidation occurs and new acquisitions are made. A single customer may have orders on multiple systems. For example, a paint manufacturer may need different types of latex for different products. The customers will want a single view of all orders notwithstanding which order entry system they reside on. The lag between entry of an order and its appearance on a customer-facing website should be minimal (less than one hour). All order entry systems are on the same network. There are no occasionally connected systems (for example, remote locations that may potentially lose their network connectivity). Strategic direction is to convert Oracle systems to Microsoft SQL Server and Java to C#. The new order tracking system does not need to integrate with order fulfillment or other systems at launch. There are priorities for orders (for example, "I need it tomorrow" requires immediate processing and overnight shipment versus "I need it next week"). Legacy SQL Servers are SQL Server 2005 or 2008. No SQL Server 2000 systems. Pattern description The organization is trying to streamline data entry into multiple systems that perform similar functions. They wish to take in the same data (an order), but depending on attributes of the order, it should be loaded into one system or another. This looks like a content-based routing scenario. What is content-based routing? In essence, it is distributing data based on the values it contains. You would typically use this sort of pattern when you have a single capability (for example, ADD ORDER, LOOKUP EMPLOYEE, DELETE RESERVATION) spread across multiple systems. Unlike a publish/subscribe pattern where multiple downstream systems may all want the same message (that is, one-to-many), a content-based routing solution typically helps you steer a message to the system that can best handle the request. What is an alternative to implementing this routing pattern? You could define distinct channels for each downstream system and force the caller to pick the service they wish to consume. That is, for McKeever Technologies, the customer would call one service if they were ordering products A, B, or C, and use another service for products D, E, or F. This clearly fails the SOA rules of abstraction or encapsulation and forces the clients to maintain knowledge of the backend processing. The biggest remaining question is what is the best way to implement this pattern. We would want to make sure that the routing rules were easily maintained and could be modified without expensive redeployments or refactoring. Our routing criteria should be rich enough so that we can make decisions based on the content itself, header information, or metadata about the transmission. Candidate architectures A team of technologists have reviewed the use case and drafted three candidate solutions. Each candidate has its own strengths and weaknesses, but one of them will prove to be the best choice. Candidate architecture #1–BizTalk Server A BizTalk Server-based solution seems to be a good fit for this customer scenario. McKeever Technologies is primarily looking to automate existing processes and communicate with existing systems, which are both things that BizTalk does well. Solution design aspects We are dealing with a fairly low volume of data (1000 orders per day, and at most, 5000 queries of order status) and small individual message size. A particular order or status query should be no larger than 5KB in size, meaning that this falls right into the sweet spot of BizTalk data processing. This proposed system is responsible for accepting and processing new orders, which means that reliable delivery is critical. BizTalk can provide built-in quality of service, guaranteed through its store-and-forward engine, which only discards a message after it has successfully reached its target endpoint. Our solution also needs to be able to communicate with multiple line-of-business systems through a mix of web service and database interfaces. BizTalk Server offers a wide range of database adapters and natively communicates with SOAP-based endpoints. We are building a new solution which automates a formerly manual process, so we should be able to design a single external interface for publishing new orders and querying order status. But, in the case that we have to support multiple external-facing contracts, BizTalk Server makes it very easy to transform data to canonical messages at the point of entry into the BizTalk engine. This means that the internal processing of BizTalk can be built to support a single data format, while we can still enable slight variations of the message format to be transmitted by clients. Similarly, each target system will have a distinct data format that its interface accepts. Our solution will apply all of its business logic on the canonical data format and transform the data to the target system format at the last possible moment. This will make it easier to add new downstream systems without unsettling the existing endpoints and business logic. From a security standpoint, BizTalk allows us to secure the inbound transport channel and message payload on its way into the BizTalk engine. If transport security is adequate for this customer, then an SSL channel can be set up on the external facing interface. To assuage any fears of the customer that system or data errors can cause messages to get lost or "stuck", it is critical to include a proactive exception handling aspect. BizTalk Server surfaces exceptions through an administrator console. However, this does not provide a business-friendly way to discover and act upon errors. Fortunately for us, BizTalk enables us to listen for error messages and either re-route those messages or spin up an error-specific business process. For this customer, we could recommend either logging errors to a database where business users leverage a website interface to view exceptions, or, we can publish messages to a SharePoint site and build a process around fixing and resubmitting any bad orders. For errors that require immediate attention, we can also leverage BizTalk's native capability to send e-mail messages. We know that McKeever Technologies will eventually move to a single order processing system, so this solution will undergo changes at some point in the future. Besides this avenue of change, we could also experience changes to the inbound interfaces, existing downstream systems, or even the contents of the messages themselves. BizTalk has a strong "versioning" history that allows us to build our solution in a modular fashion and isolate points of change. Solution delivery aspects McKeever Technologies is not currently a BizTalk shop, so they will need to both acquire and train resources to effectively build their upcoming solution. Their existing developers, who are already familiar with Microsoft's .NET Framework, can learn how to construct BizTalk solutions in a fairly short amount of time. The tools to build BizTalk artifacts are hosted within Visual Studio.NET and BizTalk projects can reside alongside other .NET project types. Because the BizTalk-based messaging solution has a design paradigm (for example, publish/subscribe, distributed components to chain together) different from that of a typical custom .NET solution, understanding the toolset alone will not ensure delivery success. If McKeever Technologies decides to bring in a product like BizTalk Server, it will be vital for them to engage an outside expert to act as a solution architect and leverage their existing BizTalk experience when building this solution. Solution operation aspects Operationally, BizTalk Server provides a mature, rich interface for monitoring solution health and configuring runtime behavior. There is also a strong underlying set of APIs that can be leveraged using scripting technologies so that automation of routine tasks can be performed. While BizTalk Server has tools that will feel familiar to a Windows Administrator, the BizTalk architecture is unique in the Microsoft ecosystem and will require explicit staff training. Organizational aspects BizTalk Server would be a new technology for McKeever technologies so definitely there is risk involved. It becomes necessary to purchase licenses, provision environments, train users, and hire experts. While these are all responsible things to do when new technology is introduced, this does mean a fairly high startup cost to implement this solution. That said, McKeever technologies will need a long term integration solution as they attempt to modernize their IT landscape and be in better shape to absorb new organizations and quickly integrate with new systems. An investment in an enterprise service bus like BizTalk Server will pay long term dividends even if initial costs are high. Solution evaluation
Read more
  • 0
  • 0
  • 5636

article-image-debatching-bulk-data-microsoft-platform
Packt
16 Sep 2010
14 min read
Save for later

Debatching Bulk Data on Microsoft Platform

Packt
16 Sep 2010
14 min read
(For more resources on Microsoft Platform, see here.) Why is it better to shovel one ton of data using two thousand, one pound shovels instead of one big load from a huge power shovel? After all, large commercial databases and the attendant bulk loader or SQL Loader programs are designed to do just that: insert huge loads of data in a single shot. The bulk load approach works under certain tightly constrained circumstances. They are as follows: The "bulk" data comes to you already matching the table structure of the destination system. Of course, this may mean that it was debatched before it gets to your system. The destination system can accept some, potentially significant, error rate when individual rows fail to load. There are no updates or deletes, just inserts. Your destination system can handle bulk loads. Certain systems (for example, some legacy medical systems or other proprietary systems) cannot handle bulk operations. As the vast majority of data transfer situations will not meet these criteria, we must consider various options. First, one must consider which side of the database event horizon one should perform these tasks. One could, for example, simply dump an entire large file into a staging table on SQL Server, and then debatch using SQL to move the data to the "permanent" tables. Use case Big Box Stores owns and operates retail chains that include huge Big Box warehouse stores, large retail operations in groceries and general department stores and small convenience stores that sell gasoline, beverages, and fast food. The company has added brands and stores over the past few years through a series of mergers. Each brand has its own unique point of sale system. The stores operate in the United States, Canada, Mexico, and Western Europe. The loss prevention department has noticed that a number of store sales and clerical staff are helping themselves to "five-finger bonuses." The staff members use various ruses to take money from cash registers, obtain goods without paying for them, or otherwise embezzle money or steal goods from Big Box. These patterns typically unfold over periods of several days or weeks. For example, employees will make purchases using their employee discount at the store where they work, then return the product for full price at another store where they are not known or they have an accomplice return the goods to the employee for a full refund. The various methods used to steal from Big Box fall into these recognized patterns and a good deal of this theft can be uncovered by analyzing patterns of sales transactions. Standard ETL techniques will be used to import data concerning the stores, products, and employees to a database where we can analyze these patterns and detect employee theft. We have been tasked with designing a system that will import comma-delimited files exported by the point of sales (POS) systems into a SQL Server database that will then perform the analysis. Data concerning each sale will be sent from each of the point of sale systems. The files will hold all or part of the prior day's sales and will range from 30,000 to over 2.5 million rows of data per file. For stores that have "regular" business hours, files will become available approximately one hour after the stores close. This time will vary based on the day of the week and the time of year. During "normal" operations, stores typically close at 9:00 PM local time. During certain peak shopping periods (for example, Christmas or local holiday periods) stores remain open until midnight, local time. Convenience stores are opened 24 hours per day, 7 days per week. Data will be sent for these stores after the POS system has closed the books on the prior day, typically at 1:00 AM local time. The POS systems can be extended to periodically expose "final" sales to the system throughout the business day via a web service. The impact of using this method during a peak sales period is unknown, and performance of the POS may degrade. A full day's data may also be extracted from the POS system in the comma-delimited format discussed as follows. The web service would expose the data using the natural hierarchy of "sales header" and "sales detail." All data must be loaded and available to the loss prevention department by 9 AM CET for European stores and 9 AM EST for North American stores. It should be noted that the different POS use different data types to identify stores, employees, products, and sales transactions. The load job must account for this and properly relate the data from the store to the master data loaded in a separate application. The data will be sent in two comma-delimited files, one containing the "Sales Header" data and one containing the sales details. The data will be in the following format: Sales Header SalesID, StoreID, EmployeeID, EmployeeFirstName, EmployeeLastName, RegisterID, RegisterLocation, storeAddress, StoreCity, StoreProvince, StorePostalCode, CustomerID, CustomerFirstName, CustomerLastName, CustomerPostalCode, Date, Time, Method of Payment, CreditCardNumber, TotalSales, Amount Tendered, Change, PriorSalesID, Return Sales Detail SalesID, ProductID, Quantity, markedPrice, ActualPrice, ReturnItem, DiscountCode, DiscountPercent, DiscountDescription, OriginalPurchaseDate, OriginalPurchaseStore, OriginalPurchaseSalesID, originalCustomerID, OriginalFirstName, OriginalLastName, OriginalStoreID, OriginalRegisterID, OriginalEmployeeID Key requirements Our mission is to move this data into a data mart that will use a standard star schema for this analysis. Big Box intended to prosecute employees for larceny or theft offences based on evidence this system gathers. Given the legal requirements that evidence gathered through this process must stand up in court, it is vital that this data be correct and loaded with a minimal number of errors or issues. Additional facts As is fairly typical, the use case above does not contain information on all of the facts we would need to consider when designing a solution. Every company has operating assumptions that the enterprise takes as a "given" and others we learn through our own involvement with the enterprise. These "facts" are so ingrained into an organization's culture that people may not even recognize the need to explicitly state these requirements. For example, if a consultant arrives at a company in Denver, CO that only does business in the United States, then he or she can expect that the business language will be English with US spelling. The exact same company in Calgary, doing business in Canada will need both English with British spelling and French. It is doubtful one would ever see such "requirements" stated explicitly, but anyone designing a solution would do well to keep them in mind. Other facts may be extrapolated or derived from the given requirements. When you are designing a solution you must take these criteria into account as well. It would be at best unwise to design a solution that was beyond the skill set for the IT staff, for example. In this case, it is probably safe to say the following: Fact or Extrapolation Reason Big Box has a very sophisticated IT staff that can handle any advanced and sophisticated technologies. They are currently handling multiple POS systems on 2 continents and already do sophisticated ETL work from these systems to existing BI systems. Getting the deliverable "right" is more important than getting it done "fast". Legal requirements for using data as evidence. Data must be secure during movement to avoid allegations of evidence tampering. Legal requirements for using data as evidence. Some level of operational control and monitoring must be built into the application we will design. Common courtesy to the Network Operations Center (NOC) staff who will deal with this, if nothing else. Candidate architectures We can tackle this problem from multiple angles, so let us take a look at the available options. Candidate architecture #1–SSIS First, we will explore the pros and cons of using SSIS for our solution platform. Solution design aspects This scenario is the sweet spot for SSIS. SSIS is, first and foremost, an ETL and batch data processing tool. SSIS can easily read multiple files from a network drive and has the tools out of the box that can debatch, either before or after loading to a database. Nonetheless, we are faced with certain hurdles that will need to be accounted for in our design. We do not control precisely when the POS data will be made available. There are a number of variables that influence that timing, not the least of which is the potential need for human intervention in closing books for the day and variable times throughout the year and across the globe when a particular store's books will be closed. We need to expect that files will be delivered over a time range. In some ways this is helpful, as it spreads some of the load over time. One of the great things about SSIS in this situation is the flexibility it provides. We can load all of the data in a single batch to a staging table then move it (debatch) to its final destinations using SQL, or we can debatch on the application side and load directly to the final tables, or any combination that suits us and the strengths of the development team. SSIS can also be extended to monitor directories and load data when it becomes available. Finally, SSIS integrates easily into NOC monitoring systems and provides the ability to guarantee data security and integrity as required for this application. Moreover, SSIS does not incur any additional licensing costs, as it ships with SQL Server out of the box. Solution delivery aspects It is not clear from our use case what depth of experience Big Box staff has with SSIS. However, they certainly have experience with database technologies, SQL queries, and with other advance technologies associated with data transfer and integration, given the size of the enterprise operations. We can reasonably expect them to pick up any unfamiliar technologies quickly and easily. This application will require some extensions to the typical ETL paradigm. Here data must go through some amount of human intervention through the daily "closing" before it is made available. This will involve tasks such as physically counting cash to make sure it matches the records in the POS system. Any number of factors can accelerate or delay the completion of this task. SSIS will therefore need to monitor the directories where data are delivered to ensure the data is available. Also, we will need to design the system so that it does not attempt to load partially completed files. This is a classic ETL problem with many potential solutions and certainly does not present insurmountable issues. Solution operations aspects In this case, we have one vitally important operational requirement; the solution must guarantee data integrity and security so that the data can be used to prosecute thieves or otherwise stand up to evidentiary rules. SSIS and SQL Server 2008 Enterprise Edition can handle these requirements. SQL Server 2008 security and data access auditing features will meet chain of custody requirements and ensure that no data tampering occurred. SSIS can enforce business rules programmatically to ensure the precise and accurate transfer of the data sent by the POS systems. Many of these requirements will be filled with the design of the database itself. We would use, for example, the data access auditing now available with SQL Server 2008 to monitor who has been working with data. The database would use only Windows-based security, not SQL Server based security. Other steps to harden SQL Server against attack should be taken. All the previously mentioned features secure the data while at rest. We will need to focus on how to ensure data integrity during the transfer of the data—while the data is in motion. SSIS has logging tools that will be used to monitor unsuccessful data transfers. Moreover, we can extend these tools to ensure either a complete data load or that we will have an explanation for any failure to load. It should be noted that the loss prevention staff is interested in outliers, so they will want to carefully examine data that fails to meet business requirements (and therefore fails to load to our target system) to look for patterns of theft. Organizational aspects We understand that Big Box staff has the technical wherewithal to handle this relatively simple extension to existing SQL Server technologies. This is a group of database professionals who deal with multiple stores performing over 2 million transactions per day. They support the POS, financial, inventory, and other systems required to handle this volume on two continents. This is a small step for them in terms of their ability to live with this solution. Solution evaluation Candidate architecture #2–BizTalk Server While not primarily targeted at bulk data solutions, BizTalk Server can parse large inbound data sets, debatch the individual records, and insert them into a target system. Solution design aspects The POS systems that provide sales data to the Big Box data hub typically produce comma-delimited files. Using BizTalk Server, we can define the document structure of delimited files and natively accept and parse them. The requirements earlier also stated that the POS systems could be extended to publish a more real-time feed via web services as opposed to the daily file drop of data. This is more in tune with how BizTalk does standard processing (real-time data feeds) and would be a preferred means to distribute data through the BizTalk bus. BizTalk Server's SQL Server adapter is built to insert a record at a time into a database. This means that the BizTalk solution needs to break apart these large inbound data sets and insert each record individually into the final repository. Messages are debatched automatically in BizTalk via pipeline components and specially defined schemas, but this is a CPU-intensive process. We would want to isolate the servers that receive and parse these data sets so that the high CPU utilization doesn't impede other BizTalk-based solutions from running. Solution delivery aspects Big Box leverages SQL Server all across the organization, but does not currently have a BizTalk footprint. This means that they'll need to set up a small infrastructure to host this software platform. They do have developers well-versed in .NET development and have typically shown a penchant for utilizing external consultants to design and implement large enterprise solutions. It would be critical for them to build up a small center of excellence in BizTalk to ensure that maintenance of this application and the creation of new ones can progress seamlessly. Solution operations aspects BizTalk Server provides strong operational support through tooling, scripting, and monitoring. If the downstream database becomes unavailable, BizTalk will queue up the messages that have yet to be delivered. This ensures that no sales information gets lost in transit and provides a level of guarantee that the data mart is always accurate. Given the relatively large sets of data, the operations team will need to configure a fairly robust BizTalk environment, which can handle the CPU-intensive debatching and perform the database inserts in a timely fashion. Organizational aspects Big Box would be well served by moving to a more real-time processing solution in the near future. This way, they can do more live analysis and not have to wait until daily intervals to acquire the latest actionable data. A messaging-based solution that relies on BizTalk Server is more in tune with that vision. However, this is a critical program and speed to market is a necessity. Big Box accepts a high level of risk in procuring a new enterprise software product and getting the environments and resources in place to design, develop, and support solutions built upon it. Solution evaluation Architecture selection SQL Server and SSIS Benefits Risks• Easily deployed and extensible ETL tool Need to build sophisticated error handling systems •Designed to handle batch processing of large files, exactly the task at hand   •No additional licensing costs - comes with SQL Server   •Can be built and maintained by current staff   BizTalk Server Benefits Risks Provides for live, real-time analysis •CPU-intensive processes Can leverage BizTalk capability to send events to downstream transactional systems High database process overhead •Enterprise-class hosting infrastructure Additional licensing and capital costs   Not clear if staff has the skills to support product When all is said and done, this is exactly the scenario that SSIS was designed to handle, a batch load to a data mart. Moreover, the selection of SSIS entails no additional licensing costs, as might be the case with BizTalk.
Read more
  • 0
  • 0
  • 2087

article-image-introduction-parallel-programming-and-cuda-sample-code
Packt
16 Sep 2010
3 min read
Save for later

Introduction to Parallel Programming and CUDA with Sample Code

Packt
16 Sep 2010
3 min read
To give an example, let’s say we have an array that contains thousands of floating-point integers and each value needs to be run through a lengthy algorithm. Instead of running each value through the algorithm consecutively (i.e. one at a time), parallelism allows multiple values to be processed simultaneously (i.e. running many values through the algorithm at the same time), reducing overall processing time and producing fast and accurate results. There are some restrictions with using parallelism and not every program can be done in parallel. For instance, let’s say we have that same program from before but this time as we process a value we want to then check the currently processed value against all the previously calculated values in the array, before going to the next. We can confidently say all previous values in the array have been processed and are available to be accessed for the check. If we tried to do this in parallel, we could have incorrect data because multiple values are calculated at the same time and some may be ready for checking while others are not. Extra checks and steps are needed to prevent these types of concurrency issues. However, the results could still prove to be worth the extra steps. One of the major breakthroughs in parallel programming technology today goes beyond the scope of just multi-core CPU’s. Although they do offer a lot more power and potential than single-core units, another common computer component, the GPU, offers even more power, and NVIDIA’s flagship product, called CUDA, offers this technology to all developers easily and for free. CUDA was developed by NVIDIA to provide simple access to GPGPU (General-Purpose Computation on Graphics Processing Units) and parallel computing on their own GPU’s. The logic behind the idea is that GPU’s have much more processing power than CPU’s and have numerous cores that operate in parallel to run intensive graphics operations. By allowing developers to utilize this power for their own projects, it can create fast solutions to some heavy and time-consuming programs, specifically those that run the same process recursively and independently of other processes. The learning curve is not very steep for most developers. CUDA accomplishes making GPGPU easily usable by adding functionality to the standard C and C++ programming languages. This allows for fast adoption by almost any programmer and helps with cross-platform integration. To get started with CUDA, you will need a recent NVIDIA GPU (Geforce 8 series and beyond, or you can check on the NVIDIA website to see which GPU’s are CUDA enabled). CUDA works on Windows, Mac OSX, and certain Linux distributions. You will need to download and install the developer drivers, the CUDA toolkit, and the CUDA SDK off the Nvidia website, respectively. NVIDIA provides an installation guide on their website which provides more details about the installation process, as well as a method of checking the installation to see if it is working.
Read more
  • 0
  • 0
  • 3555
article-image-building-content-based-routing-solution-microsoft-platform
Packt
16 Sep 2010
7 min read
Save for later

Building the Content Based Routing Solution on Microsoft Platform

Packt
16 Sep 2010
7 min read
The flow of the solution looks like the following: An order comes from a customer to a single endpoint at McKeever Technologies. This single endpoint then routes the order based on the content of the order (that is, the value of the Product ID element). The router sends requests to WCF Workflow Services, which can provide us durability and persistence when talking to the backend order management systems. If an order system is down, then the workflow gets suspended and will be capable of resuming once the system comes back online. Setup First, create a new database named Chapter8Db in your local SQL Server 2008 instance. Then locate the database script named Chapter8Db.sql in the folder <Installation Directory>Chapter8Begin and install the tables into your new database. When completed, your configuration should look like the following screenshot: Next, open Chapter8.sln in the <Installation Directory>Chapter8Begin folder. In this base solution you will find two WCF services that represent the interfaces in front of the two order management systems at McKeever Technologies. Build the services and then add both of them as applications in IIS. Make sure you select the .NET 4.0 application pool. If you choose, you can test these services using the WCF Test Client application that comes with the .NET 4.0 framework. If your service is configured correctly, an invocation of the service should result in a new record in the corresponding SQL Server database table. Building the workflow Now that our base infrastructure is in place, we can construct the workflows that will execute these order system services. Launch Visual Studio.NET 2010 and open Chapter8.sln in the &ltInstallation Directory>Chapter8Begin folder. You should see two WCF services. We now must add a new workflow project to the solution. Recall that this workflow will sit in front of our order service and give us a stronger quality of service, thanks to the persistence capability of AppFabric. In Visual Studio .NET 2010, go to File and select New Project. Select the WCF Workflow Service project type under the Workflow category and add the project named Chapter8.SystemA.WorkflowService to our existing solution. This project is now part of the solution and has a default workflow named Service1.xamlx. Rename the Service1.xamlx file to SystemAOrderService.xamlx from within the Solution Explorer. Also click the whitespace within the workflow to change both the ConfigurationName and Name properties. We want all our service-fronting workflows to have the same external-facing contract interface so that we can effectively abstract the underlying service contracts or implementation nuances. Hence, we add a new class file named OrderDataContract.cs to this workflow project. This class will hold the data contracts defining the input and output for all workflows that sit in front of order systems. Make sure the project itself has a reference to System.Runtime.Serialization, and then add a using statement for System.Runtime.Serialization to the top of the OrderDataContract.cs class. Add the following code to the class: namespace Chapter8.WorkflowService{ [DataContract( Namespace = "http://Chapter8/OrderManagement/DataContract")] public class NewOrderRequest { [DataMember] public string OrderId { get; set; } [DataMember] public string ProductId { get; set; } [DataMember] public string CustomerId { get; set; } [DataMember] public int Quantity { get; set; } [DataMember] public DateTime DateOrdered { get; set; } [DataMember] public string ContractId { get; set; } [DataMember] public string Status { get; set; } } [DataContract( Namespace = "http://Chapter8/OrderManagement/DataContract")] public class OrderAckResponse { [DataMember] public string OrderId { get; set; } }} Open the SystemAOrderService.xamlx workflow, click on the top ReceiveRequest shape, and set the following property values. Note that we will use the same values for all workflows so that the external-facing contract of each workflow appears the same. Property Value DisplayName ReceiveOrderRequest OperationName SubmitOrder ServiceContractName {http://Chapter8/OrderManagement} ServiceContract Action http://Chapter8/OrderManagement/SubmitOrder CanCreateInstance True Click the Variables tab at the bottom of the workflow designer to show the default variables added to the workflow. Delete the data variable. Create a new variable named OrderReq. For the variable type, choose Browse for Types and choose the NewOrderRequest type we defined earlier in the OrderDataContract.cs class. Add another variable named OrderResp and choose the previously defined OrderAckResponse .NET type. The OrderReq variable gets instantiated by the initial request, but we need to explicitly set the OrderResp variable. In the Default column within the Variables window, set the value to New OrderAckResponse(). Set a proper variable for the initial receive shape by clicking on the ReceiveOrderRequest shape and click on the View Message link. Choose OrderReq as the Message data and set the type as NewOrderRequest. Now we do the same for the response shape. Select the SendResponse shape and click on the View Message link. Choose the OrderResp variable as the Message data and OrderAckResponse as the Message type. Keep the SendResponse shape selected and set its PersistBeforeSend property to On. This forces a persistence point into our workflow and ensures that any errors that occur later in the workflow will lead to a suspended/resumable instance. We can test our workflow service prior to completing it. We want to populate our service response object, so go to the Workflow toolbox, view the Primitives tab, and drag an Assign shape in between the existing receive and send shapes. In the Assign shape, set the To value to OrderResp.OrderID and the right side of the equation to System.GUID.NewGUID().ToString(). This sets the single attribute of our response node to a unique tracking value. Build the workflow and if no errors exist, right-click the SystemAOrderSystem.xamlx workflow in the Solution Explorer and choose View in Browser. Open the WCF Test Client application and point it to our Workflow Service endpoint. Double-click the Submit Order operation, select the datatype in the Value column, and enter test input data. Click on the Invoke button and observe the response object coming back with a GUID value returned in the OrderId attribute. Now we're ready to complete our workflow by actually calling our target WCF service that adds a record to the database table. Return to Visual Studio. NET, right-click the Chapter8.SystemA.WorkflowService project, and choose Add Service Reference. Point to the service located at http://localhost/Chapter8.OrderManagement.SystemA/OrderIntakeService.svc and type SystemASvcRef as the namespace. If the reference is successfully added and the project is rebuilt, then a new custom workflow activity should be added to the workflow toolbox. This activity encapsulates everything needed to invoke our system service. Add variables to the workflow that represent the input and output of our system service. Create a variable named ServiceRequest and browse for the type Order, which can be found under the service reference. Set the default value of this variable to New Order(). Create another variable named ServiceResponse and pick the same order object but do not set a default value. Drag the custom AddOrder activity from the workflow toolbox and place it after the SendResponse shape. This sits after the workflow service response is sent, so that if errors occur the caller will not be impacted. Click the AddOrder shape and set its NewOrder property to the ServiceRequest variable and its AddOrderResult property to ServiceResponse. Now we have to populate the service request object. Drag a Sequence workflow activity from the Control Flow tab and drop it immediately before the AddOrder shape. Add six Assign shapes to the Sequence and set each activity's left and right fields as follows: Left Side Right Side ServiceRequest.ContractId OrderReq.ContractId ServiceRequest.CustomerId OrderReq.CustomerId ServiceRequest.DateOrdered OrderReq.DateOrdered ServiceRequest.OrderNumber OrderResp.OrderId ServiceRequest.ProductId OrderReq.ProductId ServiceRequest.Quantity OrderReq.Quantity Note that the OrderNumber value of the request is set using the OrderResp object as that is the one to which we added the GUID value. Our final workflow should look like the following:
Read more
  • 0
  • 0
  • 2427

article-image-sharing-content-wordpress-top-plugins
Packt
16 Sep 2010
6 min read
Save for later

Sharing Content in WordPress Top Plugins

Packt
16 Sep 2010
6 min read
(For more resources on WordPress see here.) TweetMeme By Alex King (http://alexking.org/) Why it's awesome: Allows Twitter users to quickly share your blog post, and it tracks how often they do it Why it was picked: Super simple to install; no Twitter account is needed Manual Install URL: http://wordpress.org/extend/plugins/tweetmeme/ Automatic Install search term: TweetMeme Geek level: Webmaster Configuration location: Top Navigation | TweetMeme Used in: Posts, pages The TweetMeme button is the fastest way to allow your readers to quickly share your blog posts to Twitter with a single click. In addition to offering this awesome sharing tool, you can also sign up for TweetMeme's analytic services to track the effectiveness of each of your posts. Setting up TweetMeme You can access TweetMeme's settings from the Top Level Navigation and then TweetMeme Settings|. The following is a list of the most important settings to focus on and what they do. Display: Choose this if you want to display the TweetMeme button on pages, on the home page, and within your feed Position: TweetMeme allows you to display the TweetMeme button in various positions around your blog posts—before, after, both before and after, shortcode, or manually Type: TweetMeme offers two types of buttons—normal and compact. By default, the normal button is displayed Source: Supply your Twitter username here, if you have one URL Shortener: Often, WordPress blog post URLs are rather lengthy and can eat up to many of the 140 characters Twitter allows. It recommends using Bit.ly for your URL shortening—Bit.ly has proven to be a resilient company that won't be disappearing any time soon. TweetMeme API App ID & TweetMeme API App Key: TweetMeme offers detailed analytics when people re-tweet your blog posts. This service is not free, but they do offer a free trial to get your hands dirty. To leverage TweetMeme analytics, you will need to create an account at http://my.tweetmeme.com, after which you will be able to find your API App ID and API App key from http://my.tweetmeme.com/profile Wordbook By Robert Tsai (http://www.tsaiberspace.net/) Why it's awesome: You can share your posts to a user's Facebook wall Why it was picked: Ease of setup, integration level with Facebook Manual Install URL: http://wordpress.org/extend/plugins/wordbook/ Automatic Install search term: Wordbook Geek level: Webmaster Configuration location: Settings|Wordbook Used in: Posts Robert Tsai's Wordbook is an awesome way to get your blog posts listed on your Facebook profile or your Facebook pages. WordPress will post to Facebook a snippet of your post and a thumbnail of any images that might be in your post. Once installed, you will see a red bar across your WordPress administrator section stating Wordbook needs to be setup—click the Wordbook link to start the configuration. In order to publish your posts to Facebook, you will need to connect your blog to Facebook—to start this process, click the blue Facebook button. Once you start the process, you will be redirected to Facebook to authorize WordPress to communicate with your Facebook account. Now, each time you create a blog post, WordPress will create a new shared item in your Facebook newsfeed. WP Download Manager By Lester Chan (http://lesterchan.net/) Why it's awesome: Quickly add downloadable files and media to your blog Why it was picked: Lester's plugins are legendary, they offer download tracking Manual Install URL: http://wordpress.org/extend/plugins/nextgen-gallery/ Automatic Install search term: WP Download Manager Geek level: Webmaster Configuration location: Top Navigation | Downloads Used in: Posts, pages It offers your readers the ability to download content. It is one sure fire way of increasing your blog traffic and the happiness of your readers. WP Download Manager makes managing and tracking downloaded files from your blog a snap. Adding a new download Start off by clicking Add File from the Downloads menu and follow these steps: File: Select how you want to add a file: Browse File will show you a drop-down menu containing any files in the wp-content/files directory on your web server. Upload File allows you to select any file from your computer to upload. The majority of the time, this is the method you will be using. Remote File allows you to grab a file from any web server using a URL. File Name: Give your download a human-readable name. File Description: Supply a little information that will help your readers know what the file is about. File Category: Select the category for this file. You can create new categories from the Download | Download Options menu. File Size: Unless you are using the Remote File method, leave this field blank. WP Download Manager offers automatic detection of file size, but sometimes it will not work properly on Remote Files. File Date: If you need to back-date your file, you can use this field to do so. However, the majority of the time you will leave this field alone. Starting File Hits: If you want to make your download look more popular, you can pad the number of downloads. Allowed to Download: If you want to limit downloads only to readers who are subscribed and logged in, use this drop-down menu to control who can download. Your options are Everyone, Registered Users Only, Contributors, Authors, Editors, or Administrators. Click Add File. Inserting a download into a post Now that we have a new file uploaded to the Download Manager, we need to make it accessible to our readers. The WP Download plugin will add a new button to your WYSIWYG menu on posts and pages. One downside to WP Download is that you have to know the ID of the file you want to include in your post or page. Once you click the Download button, provide the download id in the pop-up window. You can find the ID of your file by clicking Download | Manage Downloads; the first column will contain the ID of the download. Twiogle Twitter Commenter By Twiogle (http://twiogle.com/) Why it's awesome: Quickly fills your blog's comments with somewhat relevant content Why it was picked: Easy to set up, works exactly as advertised Manual Install URL: http://wordpress.org/extend/plugins/twiogle-search/ Automatic Install search term: Twiogle Commenter Geek level: Newbie Configuration location: Settings | Twiogle Twitter Commenter Used in: Posts, pages, widgets Twiogle Twitter Commenter has a horrible name, but an awesome result. If your blog is lacking in comments and chatter, this plugin will automatically add new ones from recent tweets. It works its magic by taking the tags from your blog post and searches Twitter for tweets that use the same tags. To really take advantage of this plugin, you need to make sure you add tags to your blog posts; the more specific your tags are, the more relevant the comments that will be imported. With any service that automatically adds content to your blog, you need to keep an eye on it. It is very much possible for your comments to get overrun with pointless Twitter chatter if you run this plugin for too long.
Read more
  • 0
  • 0
  • 2804
Modal Close icon
Modal Close icon