Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Events
Videos
Audiobooks
Packt Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds

How-To Tutorials

7019 Articles
article-image-development-windows-mobile-applications-part-1
Packt
26 Oct 2009
4 min read
Save for later

Development of Windows Mobile Applications (Part 1)

Packt
26 Oct 2009
4 min read
Windows OS for Windows Mobile is available in various versions, but for this article we will be using Windows Mobile 6. Windows Mobile 6 uses .NET Compact Framework v2 SP2, and has 3 different versions: Windows Mobile 6 Standard (phones without Touch Screen) Windows Mobile 6 Professional (with Phone functionality) Windows Mobile 6 Classic (without Phone functionality) Windows Mobile 6.1 and Windows Mobile 6.5 are other 2 higher versions available with some additional features as compared to Windows Mobile 6. Windows Mobile 7 expected to be released in 2010 and is said to have major updates. This article concentrates on development on Windows Mobile 6 Professional. Software Prerequisite This article will introduce you to the development for Windows Mobile 6 Professional, using Visual C#. Windows Mobile 6 has .NET Compact Framework v2 SP2 preinstalled. .NET Compact Framework is a Compact Edition of .NET Framework, and does not have all the features of the complete .NET Framework. Following are the software required for development: Microsoft Visual Studio 2008 Windows Mobile 6 Professional SDK Refresh (SDK contains emulator, used for testing, debugging. To download click here) ActiveSync (Used for Data Synchronizing between development machine and Windows Mobile, To download click here) Without making any exception, we will follow the golden rule of learning by writing “Hello World” application. Hello World We will assume that you have installed all the prerequisite software mentioned above. Launch Visual Studio 2008 and select Visual C# (if prompted). Create a new Project (File -> New) as shown below: While creating a new Project, Visual Studio 2008 IDE provides an option to select an installed template, which will create Project with all the basic requirements/structure for development. For Windows Mobile, we will select option Smart Device and template Smart Device Project as shown below.  You can also provide: Name: Name for Project. We will call it as MyFirstApp. Location: Location where this project will be created. Browse and set the desired location. We will use default location for now. Solution Name: Name for referring the Solution. Usually we keep it same as Project Name. Since Windows Mobile 6 has .NET Compact Framework v2, it will select the .NET Framework 2.0 from the dropdown on the top right. Click OK. Next step is to select the Target platform, .NET Compact Framework Version and Template. For our application we will select: Target platform: Windows Mobile 6 Professional SDK .NET Compact Framework Version: .NET Compact Framework Version 2.0. Template: Device Application Project MyFirstApp is successfully created and IDE will open a Form as shown. Let me introduce you to the various sections on screen. This is the main section called development section. All the coding and designing of the Form is done here. This section is called Toolbox and lists all the available components. If this section is not visible click View->Toolbox. This section is called Solution Explorer and shows all the forms, resources and properties. If this section is not visible click View->Solution Explorer. This section is Properties and displays all the properties for the component selected. If this section is not visible click View->Properties Window. By default Form is named as Form1. Let us first change the Name of the form. To do so select the form and the properties related to form will be listed in properties window. The entire properties list is in the form of Key Value pair. For changing Name of form, change value of property Name. For this example we will change it to HelloWorldForm. Now this form will be referred as HelloWorldForm throughout the application. Changing form name doesn’t change form caption (title) it is still showing Form1. To change caption change the value of property name Text. For this example we will change the Text to Hello World. Also the file representing this form in Solution Explorer will still be referred as Form1.cs, again you can either keep the name of the file as it is or can rename it. We will rename it to HelloWorld.cs.
Read more
  • 0
  • 0
  • 10349

article-image-building-your-first-application-papervision3d-part-2
Packt
26 Oct 2009
10 min read
Save for later

Building your First Application with Papervision3D: Part 2

Packt
26 Oct 2009
10 min read
This article covers: Basics of a 3D composition in Papervision3D Building your first application Basics of a 3D scene in Papervision3D Before we're ready to program some code for Papervision3D, we need to know a little bit more about 3D in Papervision3D. The following section is meant to give you a better understanding of the code that you will write. Each of these concepts relates directly to classes that are used by Papervision3D. All the object types that will be described are active elements in a 3D scene. Let's have a visualized look at all these objects: Scene The scene is the entire composition of 3D objects in a 3D space. Think of it as your stage in Flash with three axes—x, y, and z. Each object that you want to be visible should be added to the scene. If you don't add objects to the scene, they will not appear on your screen. Camera You can think of this as a real camera, which is somewhere in 3D space recording activity inside the scene. The camera defines the point of view from which you are viewing the scene. Because a camera in 3D is not a visible object, it is not part of our scene and you don't need to add it. Like a real camera you can, for example, zoom and focus. Cameras in 3D space can usually do more than real cameras. For example, in 3D you can, exclude objects to be rendered, when they are too close or too far away from the camera. The camera is able to ignore objects that are not in a certain, defined range. This is done for performance reasons. Objects that are too far away, or even behind the camera, don't need to be recorded, saving a lot of calculation for objects that are in a position where the camera simply can't see them. Viewport A viewport is a container sprite on your stage, and shows the output of what the camera sees. In the illustrative object overview, this has been compared with the lens of the camera. The lens is our window onto the 3D scene. We can make this window small and see just a small part of the scene, or make it big and see a lot. This works exactly as a real window in a wall—making it bigger will not affect how the world outside looks, but will have an effect on how much we can see from this world. The following illustration contains the visualization of a relatively big viewport on the left, along with a relatively small and wide viewport on the right. The thick dark outlines represent the viewports. In the right image, you can clearly see how the window to the 3D world works and how changing its size will not stretch the view of the 3D object in the scene. It only affects how much we see of it. 3D Objects A shape in 3D space is called a 3D object, or DisplayObject3D in Papervision3D. You can think of 3D objects as more advanced display objects just like sprites and movie clips. The difference is that a DisplayObject3D has a third axis, so we can place it anywhere in 3D space and rotate over each of the three axes. Material A material is the texture that is printed on an object. When an object doesn't have a material applied, it will be invisible. There are a variety of materials available for you to use. For example, a very simple material is a color; a more advanced example of a material could be a live streaming video. Render engine A render engine is like a rolling camera. As long as you trigger the render engine, it will output information of the scene recorded by the camera to the viewport. When you stop triggering the render engine, your viewport will not show any new image from the scene and shows the last rendered image. Rendering is actually the most intensive task for your computer, as it needs to recalculate each object that is placed inside your scene and output this to the viewport. Left-handed Cartesian coordinate system Flash, as well as Papervision3D, make use of the Cartesian coordinate system. In Flash, a regular visual object can be positioned on the stage by entering an x and y value. The object will be positioned according to these values and relative to the upper left corner of the stage. A higher x value moves the object to the right, whereas a higher y value moves it downward. The coordinate system in Papervision3D works essentially the same, except for the following two differences: Flash uses Cartesian coordinates on two axes, whereas Papervision3D makes use of them on three axes The y-axis in Flash is inversed compared to the y-axis in Papervision3D In Papervision3D, we want to position objects not only on the x and y axes, but also on an extra axis, in order to position objects in depth. This third axis is called the z-axis. In Flash, objects are positioned relative to the upper left corner, which is the 0, 0 coordinate. This is called the center point, or the origin. Predictably, the position of the origin in 3D space is located at 0, 0, 0. The three axes and the origin point are illustrated by the following image: The plus and minus signs illustrate whether the coordinate values are increasing or decreasing in the direction away from the origin. Notice that the y-axis is inverted compared to 2D coordinates in Flash. When you want to position an object lower on your screen in Flash, you need to give it a higher y position. This is how 2D coordinates on a computer screen work. The above figure shows the y-axis as according to the coordinate system as it is used by Papervision3D. Creating a basic class for Papervision3D In the previous sections you've learned what a basic scene is made of, and how you can create your own classes. Now that we have gone through all this theory, it's now time that we get our hands dirty by writing some code. Start your favorite authoring tool. The first application we'll build is a 3D scene containing a sphere that is rotating over its y-axis. A sphere is basically a "3D ball" and is built into Papervision3D as one of the default primitives. The basic document class First, have a look at the document class that defines the basic structure for the rotating sphere application. package { import flash.display.Sprite; import org.papervision3d.cameras.Camera3D; import org.papervision3d.objects.primitives.Sphere; import org.papervision3d.render.BasicRenderEngine; import org.papervision3d.scenes.Scene3D; import org.papervision3d.view.Viewport3D; public class FirstApplication extends Sprite { private var scene:Scene3D; private var viewport:Viewport3D; private var camera:Camera3D; private var renderEngine:BasicRenderEngine; private var sphere:Sphere; public function FirstApplication() { scene = new Scene3D(); camera = new Camera3D(); sphere = new Sphere(); scene.addChild(sphere); viewport = new Viewport3D(); addChild(viewport); renderEngine = new BasicRenderEngine(); renderEngine.renderScene(scene,camera,viewport); } }} Let's have a look at this in detail. While we do that, you can create a new project in Flash, Flex Builder, or Flash Builder with a document class called FirstApplication. If you're using Flex Builder or Flash Builder, don't forget to configure the path to the Papervision3D source. We know that we need to have a scene, a camera, a viewport, a 3D object with a material, and a render engine, in order to create a rendered output on the screen. Remember that the document class needs to extend Sprite. To make all these available inside the class, we need to import them first. import flash.display.Sprite;import org.papervision3d.cameras.Camera3D;import org.papervision3d.objects.primitives.Sphere;import org.papervision3d.render.BasicRenderEngine;import org.papervision3d.scenes.Scene3D;import org.papervision3d.view.Viewport3D; Now that the imports are set, we define the properties of the class. private var scene:Scene3D;private var viewport:Viewport3D;private var camera:Camera3D;private var renderEngine:BasicRenderEngine;private var sphere:Sphere; We only define the properties and their class types here, without assigning any value. We'll do that inside the constructor. Let's first create the constructor. public function FirstApplication(){} We start by creating a scene inside the constructor. A scene is needed as the holder for our 3D objects. It's very easy to create one. scene = new Scene3D(); All you have to do is create an instance of the Scene3D class, which doesn't take any parameters. Next, we add a Camera3D, which is just as easy as the creation of a new Scene. camera = new Camera3D(); A camera can take parameters when you create a new instance; however, the default values will do for now. The scene and camera are useless as long as there are no 3D objects in the scene to film. For this example a sphere will be used, which is one of the built-in 3D objects. sphere = new Sphere(); A camera, as well as a sphere, takes parameters when you instantiate it. However, when you do not pass any parameters, a default sphere will be created. Now that we have created our sphere, we need to add it to the scene, otherwise it will not be seen by the camera. This works in exactly the same way as adding regular display objects to the display list in Flash, by using the addChild() method. scene.addChild(sphere); That looks familiar, right? Now that we have a scene, a camera, and a sphere, we need to set up the window to the 3D scene, so we can see what is going on in there. We need to define our viewport and add it to the stage to make it visible. viewport = new Viewport3D();addChild(viewport); While creating a new viewport, you can pass optional parameters to it, but the default parameters are again fine for now. We are now just one step away from publishing our application. First we need to get our camera rolling. This is done by defining the render engine, which will render the current view of the camera to the viewport. renderEngine = new BasicRenderEngine();renderEngine.renderScene(scene,camera,viewport); Now that the render engine is defined and an instruction to render the scene is added, we are ready to publish this project. This should result in the following image of triangles that together form something like a circle: Case sensitivityPay attention to upper cases and lower cases in the examples. Not following these conventions might result in an error. A good example of this is the definition and instantiation of a sphere as we did in our FirstApplication.var sphere:Sphere = new Sphere();Here we see that we have defined a class property called sphere (lowercase) of a Sphere (uppercase) type, containing an instance of Sphere (uppercase). Giving a variable/property the same name as the defined object type will often cause problems. The result of these few lines of code may not look very impressive yet, but in fact this is the beginning of something that will soon become exciting and could never be accomplished this easy by regular Flash use. When you have managed to compile this application that shows the triangles, you've made it through the hardest part of this example. Let's continue building your first application and see how we can add the illusion of 3D to our object, which still looks very 2D.
Read more
  • 0
  • 0
  • 2094

article-image-building-your-first-application-papervision3d-part-1
Packt
26 Oct 2009
7 min read
Save for later

Building your First Application with Papervision3D: Part 1

Packt
26 Oct 2009
7 min read
This article covers the following: Introduction to classes and object-oriented programming Working with the document class/main application file Introduction to classes and object-oriented programming In this article we will learn to write our own classes that can be used in Flash, along with Flex Builder and Flash Builder. If you're a developer using the Flash IDE, it might be the first time you'll write your own classes. Don't worry about the difficulty level if you are new to classes. Learning how to program  in an OOP way using Papervision3D is a good way to become more familiar with classes and it  might motivate you to learn more about this subject. You will not be the first who learned to program in an OOP way, as a side effect of learning an external library such as Papervision3D is. So what are classes? In fact, they are nothing more than a set of functions (methods) and variables (properties) grouped together in a single file, which is known as the class definition. A class forms the blueprint for new objects that you create. Sounds a bit vague? What if you were told that you've probably already used classes? Each object you create from the Flash API is based on classes. For example, Sprites, MovieClips, and TextFields are objects that you have probably used in your code before. In fact, these objects are classes. The blueprints for these objects and their classes are already incorporated in Flash. First, have a look at how you can use them to create a new Sprite object: var mySprite:Sprite = new Sprite(); Looks familiar—right? By doing this, you create a new copy of the Sprite class as an object called mySprite. This is called instantiation of an object. There's no difference between instantiating built-in classes or instantiating custom written classes. Papervision3D is a set of custom classes. var myObject3D:DisplayObject3D = new DisplayObject3D(); So, although you know how to use classes, creating your own classes might be new to you. Creating a custom class An ActionScript class is basically a text-based file with an .as extension stored somewhere on your computer, containing ActionScript code. This code works as the previously mentioned blueprint for an object. Let's see what that blueprint looks like: package { public class ExampleClass { public var myName:String = "Paul"; public function ExampleClass() { } public function returnMyName():String { return "My name is" + myName; } }} On the first line, you'll find the package statement, followed by an opening curly bracket and ended with a closing curly bracket at the bottom of the class. Packages are a way to group classes together and represent the folder in which you saved the file. Imagine you have created a folder called myPackage inside the same folder where you've saved an FLA or inside a defined source folder. In order to have access to the folder and its classes, you will need to define the package using the folder's name as shown next: package myPackage { ...} This works the same way for subfolders. Let's imagine a folder called subPackage has been added to the imaginary folder myPackage. The package definition for classes inside this subfolder should then look like this: package myPackage.subPackage { ...} If you don't create a special folder to group your classes, you can use the so-called default package instead of defining a name. All the examples in this article will use default packages. However, for real projects it's good practice to set up a structure in order to organize your files. After the package definition, you'll find the class definition, which looks as follows: public class ExampleClass{ ...} The name of the class must be the same name as the class file. In this example, the file needs to be saved as ExampleClass.as. Besides the fact that working packages is a good way to organize your files, they can also be used to uniquely identify each class in a project. At the top of the class definition you'll see the word public, which is a keyword defining that the class is accessible to all other code in the project. This keyword is called, an access modifier. The defined name of the class will be used to instantiate new copies of the class. Instantiating this class could be done like this: var classExample:ExampleClass = new ExampleClass(); Inside the class, a string variable is defined in pretty much the same way as you would when working with timeline scripting. public var myName:String = "Paul"; The definition of a variable inside a class is called as a class property. You can add as many properties to a class as you want. Each definition starts off with an access modifier. In this case the access modifier is set to public, meaning that it is both readable and writeable by code located outside the class: var classExample:ExampleClass = new ExampleClass();classExample.myName = "Jeff"; As you can see, this creates an instance of ExampleClass. We also changed the myName property from Paul to Jeff. When a property is defined as public, this is allowed to happen. In case you want access to this property inside the class itself, you can mark the property as private: private var myName:String = "Paul"; Executing the previous code to change myName from Paul to Jeff will result in a compile-time error. In the next lines we see the creation of a new function called ExampleClass in the class. Functions that have the same name as the name of the class are known as constructors. public function ExampleClass(){} Constructors always have a public access modifier and are called automatically each time the class is instantiated. This means that the code inside this function will be executed automatically. All other function definitions inside the class are called methods. public function returnMyName():String{ return "My name is" + myName;} At the end of this method definition, you'll notice a colon followed by a data type. This defines the type of object the method returns. When you work with functions on the timeline in Flash, you can define this as well, but it's not required to do so. The method returnMyName() is defined to return a string. In case you do not want to return any data type, you can define this by using a void as the return type: public function returnNothing():void{ //Do not return something} We need to define return type only for methods and not for constructors. Classes, as well as properties and methods, have access modifiers that define from where each of these objects can be accessed. So far we've seen that a public keyword allows code outside the class to access a property, or call a method inside the class. When you allow access from other code, you need to be aware that this code can mess up your class. You can prevent this by using the private keyword, which makes the property or method only accessible inside your class. Two other access modifiers that are often used are internal and protected. Classes inside the same package can access internal methods or properties and protected methods can only be used inside a related subclass. Subclasses are a part of inheritance, which will be explained in a bit. As long as you have not planned to give access to scripts outside your class, it's a good practice to mark all properties and methods of a class as private by default. When defining a property or method, you should always ask yourself whether you want them to be accessed from outside your class.
Read more
  • 0
  • 0
  • 1549

article-image-article-personalize-your-pbx-using-freepbx-features
Packt
26 Oct 2009
4 min read
Save for later

Personalize Your Own PBX Using FreePBX Features

Packt
26 Oct 2009
4 min read
Let's get started. CallerID Lookup Sources Caller ID lookup sources supplement the caller ID name information that is sent by most telephone companies. A caller ID lookup source contains a list of phone numbers matched with names. When FreePBX receives a call, it can query a lookup source with the number of the caller. If the caller is on the lookup source's list, a name is returned that will be sent along with the call wherever the call gets routed to. The name will be visible on a phone's caller ID display (if the phone supports caller ID), and is also visible in the FreePBX call detail records. In order to set up a caller ID lookup source, click on the CallerID Lookup Sources link under the Inbound Call Control section of the navigation menu on the left side of the FreePBX interface as shown in the following screenshot: The Add Source screen has three common configuration options: Source Description Source type Cache results Source Description is used to identify this lookup source when it is being selected as a caller ID lookup source during the configuration of an inbound route. Source type is used to select the method that this source will use to obtain caller ID name information. FreePBX allows a lookup source to use one of the following methods: ENUM: FreePBX will use whichever ENUM servers are configured in /etc/asterisk/enum.conf to return caller ID name information. By default, this file contains the e164.arpa and e164.org zones for lookups. All ENUM servers in the enum.conf file will be queried. HTTP: FreePBX will query a web service for caller ID name information using the HTTP protocol. A lookup source that uses HTTP to query for information can use services such as Google Phonebook or online versions of the white/yellow pages to return caller ID names. When HTTP is selected as the source type, six additional options will appear for configuration. These options are discussed in the HTTP source type section. MySQL: FreePBX will connect to a MySQL database to query for caller ID name information. Usually, this will be a database belonging to a Customer Relationship Management (CRM) software package in which all customer information is stored. When MySQL is selected as the Source type, five additional options will appear for configuration. These options are discussed later in the MySQL source type section. SugarCRM: As of FreePBX version 2.5.1, this option is not yet implemented. In the future, this Source type option will allow FreePBX to connect to the database used by the SugarCRM software package to query for caller ID name information. If the Cache results checkbox is selected, then when a lookup source returns results they will be cached in the local AstDB database for quicker retrieval the next time the same number is looked up. Note that values cached in the AstDB will persist past a restart of Asterisk and a reboot of the PBX. Once a caller ID name has been cached, FreePBX will always return that name even if the name in the lookup source changes. Caching must be disabled for a new caller ID name to be returned from the lookup source. Once all configuration options have been filled out, click on the Submit Changes button followed by the orange-colored Apply Configuration Changes bar to make the new lookup source available to inbound routes. Now that we have an available lookup source, we can configure an inbound route to use this source to set caller ID information. Click on the Inbound Routes link under the Inbound Call Control section of the navigation menu on the left side of the FreePBX interface as shown in the following screenshot: Click the name of the inbound route that will use the new lookup source in the menu on the right side of the page (in this example, DID 5551234567) as shown in the following screenshot: Scroll down the page to the CID Lookup Source section. Select the name of the new lookup source from the Source drop-down menu: Click on the Submit button at the bottom of the page, followed by the orange-colored Apply Configuration Changes bar at the top of the page. Calls that are routing using this inbound route will now query our new lookup source for caller ID name information.
Read more
  • 0
  • 0
  • 4580

article-image-moodle-makeover
Packt
26 Oct 2009
6 min read
Save for later

Moodle Makeover

Packt
26 Oct 2009
6 min read
What we will do, is: Do more than make each topic a long list of resources. Use the label resource and Moodle's indenting tool to change this: To this: Find out where we can get lots of free images for our courses. Explore different ways to use HTML to make our courses even more engaging. Include a talking character—an animated avatar—using Voki.com: Arrange Your Resources Why is it important to spend a little time arranging resources in a topic? Isn't it all eye candy? Let's take a look at my Topic 1: I've got a nice colorful title, some text to introduce the topic, and then a long list of resources—which, quite honestly looks just like the list of files in the shared drive I already use to distribute my documents and handouts to students. What if the topic looked like this: This is much more the effect we need. I've reordered my resources and included some labels, so that it is much easier for students to find a resource. In this section, we're going to learn how to bring some order into our topics. Putting Your Resources in Order One obvious difference between a shared drive and Moodle is that in Moodle, you can put the resources in the order you want, not the order the computer insists on (usually, numerical/alphabetical). However, in Moodle, any new resources you add are simply queued on to the end of the topic. This has meant that resources in my Getting Things Flying topic aren't exactly ordered in a sensible way—just the way I added them. I'm going to take action to remedy that now... Time for Action – Arrange Your Resources Remember that you need editing turned on before you start. Choose the resource you want to move. I'm going to move my Backyard ballistics links resource to the end of the topic. To start the process, I need to 'pick up' the resource. I click on the Move icon: This causes two things to happen. Firstly, the resource I want to move disappears. Don't worry—imagine you have it in your hand and you are ready to place it back into your course. Secondly, the boxes that have now appeared represent all the places to which you can move the resource that you are holding: Choose where you want to move the resource to. I want my list of links at the end, so I'm going to click on the box at the bottom. The boxes disappear and my resources have been shuffled: What Just Happened? A list o f resources in Moodle isn't simply a list of files, like you would find on a shared drive. One obvious difference is that in Moodle, you can arrange your resources to be listed in the order you want, and we've just seen how easy it is to achieve this. You can't find the Move icon? Your site may be configured so that you can drag and drop resources. In that case, instead of the Move icon you will see crosshairs next to your resource. To move the resource, click on the cross hairs and, keeping your finger pressed down on the left mouse butt on, drag the resource to its new location. Look for the line in the background—this tells you where your resource is going to be dropped to—then let go of the mouse butt on when you have found the spot. Now I've got my resources in the order I wanted, I have to say that my topic looks like just another resource dump—which is what I am trying to avoid. My resources would be much easier to use if I could introduce each of them with a short piece of text: Introducing a resource with a short introduction is a great way of improving the visual appeal of your course. The tool to achieve this is called a Label resource, and here's how to use it... Time for Action – Insert a Label I'm going to start the process of arranging my resource by having a short piece of text introducing the Backyard ballistics links resource. Make sure editing is turned on, click on Add a resource, and choose Insert a label. In the Editing Label page, enter your label text. When you are done, press the Save and return to course button. The new label is added to the end of the list of resources—which is obviously the wrong place for it. Click on the Move icon, next to the label you have just added: The page is re-displayed. Your new label disappears and lots of boxes have appeared. These boxes represent the places where your new label can go: Click on the relevant box to place your label. You're done! Remember: If you don't have a Move icon, you'll have crosshairs next to the label that you can click on to drag it to the right place. What Just Happened? After all the experience we have had with Moodle so far, using the label resource will be fairly straightforward. Judicious use of labels means our course topics don't have to be simply a long list of resources. Remember to treat labels as a way of leading the student towards and into a resource. Labels are not designed for content, so try to keep labels short—perhaps two or three sentences at the most. Labels are like the glue that holds topics together. You don't want your glue to be too thick. It's looking better, but my topic is still looking a little flat. You can indent your resources by clicking on the Move right icon next to the resource: Below is how things now look with a little indenting: Seeing the course from a student's point of viewAs a teacher, you will see a lot of options on the screen that your students won't. To get a clear idea of how a student will see the course, use the Switch role to… option at the top right of the screen. Choose Student from this list, and you will see the course as students see it.When you're done, click Return to my normal role and you'll get your normal view back. You will also need to Turn editing on to get the edit controls back.
Read more
  • 0
  • 0
  • 2888

article-image-trunks-freepbx-25
Packt
26 Oct 2009
5 min read
Save for later

Trunks in FreePBX 2.5

Packt
26 Oct 2009
5 min read
A trunk in the simplest of terms is a pathway into or out of a telephone system. A trunk connects a PBX to outside resources, such as PSTN telephone lines, or additional PBX systems to perform inter-system transfers. Trunks can be physical, such as a PRI or PSTN line, or they can be virtual by routing calls to another endpoint using Internet Protocol (IP) links. Trunk types FreePBX allows the creation of six different types of trunks as follows: Zap IAX2 SIP ENUM DUNDi Custom Zap, IAX2, and SIP trunks utilize the technologies of their namesake. These trunks have the same highlights and pitfalls that extensions and devices using the same technology do. Zap trunks require physical hardware cards for incoming lines to plug into. SIP trunks are the most widely adopted and compatible, but have difficulties traversing firewalls. IAX2 trunks are able to traverse most firewalls easily, but are limited to adoption mainly on Asterisk-based systems. In terms of VoIP, ENUM(E.164 NUmber Mapping) is a method for unifying E.164 (the international telecommunication numbering plan) with VoIP routing. The ENUM system can be considered very similar to the way that the Internet DNS system works. In the DNS system, when a domain name is looked up an IP address is returned. The IP address allows a PC to traverse the Internet and find the server that belongs to that IP address. The ENUM system provides VoIP routes back when queried for a phone number. The route that is returned is usually a SIP or IAX2 route. An ENUM trunk allows FreePBX to send the dialed phone number to the publice164.orgENUM server. If the called party has listed their phone number in the e164.org directory, a VoIP route will be returned and the call will be connected using that route. A VoIP route contains the VoIP protocol, the server name or IP address, the port, and the extension to use in order to contact the dialed phone number. For example, a SIP route for dialing the number 555-555-1234 might appear as SIP:1234@pbx.example.com:5060. This is advantageous in several ways. It is important to note that indirect routes to another telephony system are often costly. Calling a PSTN telephone number typically requires that call to route through a third-party provider's phone lines and switching equipment (a service they will happily charge for). If a number is listed in the ENUM directory, the returned route will bridge the call directly to the called party (or their provider), bypassing the cost of routing through a third party. ENUM also benefits the called party, allowing them to redirect inbound calls to wherever they would like. Service disruptions that would otherwise render a particular phone number useless can be bypassed by directing the phone number to a different VoIP route in the ENUM system. More information on ENUM can be found at the following web sites: The ENUM home page The e164.org home page: The Internet Engineering Task Force ENUM charter DUNDi (Distributed Universal Number Discovery) is a routing protocol technology similar to ENUM. In order to query another Asterisk system using DUNDi, that system must be "peered" with your own Asterisk system. Peering requires generating and exchanging key files with the other peer. DUNDi is a decentralized way of accomplishing ENUM-style lookups. By peering with one system you are effectively peering with any other system that your peer is connected to. If system A peers with system B, and system B peers with system C, then system C will be able to see the routes provided by system A. In peer-topeer fashion, system B will simply pass the request along to system A, even though system C has no direct connection to system A. DUNDi is not limited to E.164 numbering schemes like ENUM and it allows a PBX to advertise individual extensions, or route patterns, instead of whole phone numbers. Therefore, it is a good candidate for distributed office setups, where a central PBX can be peered with several satellite PBX systems. The extensions on each system will be able to call one another directly without having to statically set up routes on each individual PBX. More information on DUNDi can be found at the following web sites: DUNDi home page Example DUNDi SIP configuration Example DUNDi IAX2 configuration Custom trunks work in the same fashion as custom extensions do. Any valid Asterisk Dial command can be used as a custom trunk by FreePBX. Custom trunks typically use additional VoIP protocols such as H.323 and MGCP. Setting up a new trunk Setting up a trunk in FreePBX is very similar to setting up an extension. All of the trunks share eight common setup fields, followed by fields that are specific to the technology that trunk will be using. In order to begin setting up a trunk, click on Trunks in the left side navigation menu as shown in the following screenshot: From the Add a Trunk screen, click on the name of the technology that the trunk will be using (for example, if a SIP trunk will be used, click on Add SIP Trunk) as shown in the following screenshot:
Read more
  • 0
  • 0
  • 8319
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-development-windows-mobile-applications-part-2
Packt
26 Oct 2009
3 min read
Save for later

Development of Windows Mobile Applications (Part 2)

Packt
26 Oct 2009
3 min read
Now let us see how to deploy it on Windows Mobile Device. For deploying the application on device you need to have ActiveSync installed. There are two ways in which application can be deployed on to the device.  First option is to connect the device to the Development machine via USB. ActiveSync will automatically detect it and you can click on on the top bar. And this time select option "Windows Mobile 6 Professional Device". But then this approach is useful when you want to test/deploy and use the application yourself. What if you want to distribute it to others? In that case you need to create an installation program for your Windows mobile application. The installation file in the Windows Mobile world is distributed in the form of a CAB file. So once we have done with application we should opt for option 2 of creating a CAB file (A CAB file is a library of compressed files stored as a single file). Creating CAB File Creating a CAB file itself is a new project. To create CAB project right click on the solution and select the option New Project as shown below. Clicking on New Project option will open Add New Project Wizard. Select option Setup and Deployment under Other Project Types on the left hand menu. Then select option Smart Device CAB Project on right hand side as shown below. We have named this project as MyFirstAppCAB. Click OK and MyFirstAppCAB project is created under the solution a shown. Now to add files to the CAB, right click on the Application Folder under File System on Target Machine and select option Add-> Project Output as shown. On selecting Project Output option, the following screen will popup. Depending upon the requirement, select what all needs to be compressed in CAB file. For this example we require only output, hence will select option Primary output. Now right click on CAB project MyFirstAppCAB and select option Build. CAB file with name MyFirstAppCAB will be created at the location MyFirstAppMyFirstAppCABDebug. Now let us see how we can deploy this CAB file on emulator and run the application. Click on Tools on the top bar and select option Device Emulator Manager. This will open a Device Emulator Manager as shown below. Select option Windows Mobile 6 Classic Emulator. Right click and select option Connect. Windows Mobile Emulator will start and on Device Emulator Manager you can see to left of Windows Mobile 6 Classic Emulator as shown below. Next step is to Cradle. If you are attempting to cradle for the 1st time, then you need to setup ActiveSync. To setup ActiveSync, double click on on right bottom on Task bar. Microsoft ActiveSync will open up, select option File -> Connection Settings as shown in figure below. Connection Settings window will be open up as shown below. Check the option Allow Connections to one of the followings and then from the drop down select the option DMA. After connecting Windows Mobile 6 Classic Emulator using Device Emulator Manager, again right click and select option Cradle as shown below. Cradle will start ActiveSync and make Emulator work as device connected using ActiveSync. On successful connection you can see on the left of option Windows Mobile 6 Classic Emulator on Device Emulator Manager as shown.
Read more
  • 0
  • 0
  • 2593

article-image-copying-database-sql-server-2005-sql-server-2008-using-copy-database-wizard
Packt
24 Oct 2009
3 min read
Save for later

Copying a Database from SQL Server 2005 to SQL Server 2008 using the Copy Database Wizard

Packt
24 Oct 2009
3 min read
(For more resources on Microsoft, see here.) Using the Copy Database Wizard you will be creating an SQL Server Integration Services package which will be executed by an SQL Server Agent job. It is therefore necessary to set up the SQL Server Agent to work with a proxy that you need to create which can execute the package. Since the proxy needs a credential to workout outside the SQL 2008 boundary you need to create a Credential and a Principal who has the permissions. Creating a credential has been described elsewhere. The main steps in migration using this route are: Create an Credential Create an SQL Server Agent Proxy to work with SSIS Package execution Create the job using the Copy Database Wizard Creating the Proxy In the SQL Server 2008 Management Studio expand the SQL Server Agent node and then expand the Proxies node. You can create proxies for various actions that you may undertake. In the present case the Copy Database wizard creates an Integration Services package and therefore a proxy is needed for this. Right click the SSIS Package Execution folder as shown in the next figure. Click on New Proxy.... This opens the New Proxy Account window as shown. Here Proxy name is the one you provide which will be needed in the Copy Database Wizard. Credential name is the one you created earlier which uses a database login name and password. Description is an optional info to keep track of the proxy. As seen in the previous figure you can create different proxies to deal with different activities. In the present case a proxy will be created for Integration Service Package execution as shown in the next figure. The name CopyPubx has been created as shown. Now click on the ellipsis button along the Credential name and this brings up the Select Credential window as shown. Now click on the Browse... button. This brings up the Browse for Objects window displaying the credential you created earlier. Place a checkmark as shown and click on the OK button. The [mysorian] credential is entered into the Select Credential window. Click on the OK button on the Select Credential window. The credential name gets entered into the New Proxy Account's Credential name. The optional description can be anything suitable as shown. Place a checkmark on the SQL Server Integration Services Package as shown and click on Principals. Since the present proxy is going to be used by the sysadmin, there is no need to add it specifically. Click on the OK button to close this New Proxy Account window. You can now expand the SSIS Package Execution node of the Proxies and verify that CopyPubx has been added. There are two other proxies created in the same way in this folder. Since the SQL Server Agent is needed for this process to succeed, make sure the SQL Server Agent is running. If it has not started yet, you can start this service from the Control Panel.  
Read more
  • 0
  • 0
  • 9030

article-image-why-do-we-need-specialist-security-distros
Packt
24 Oct 2009
4 min read
Save for later

Why Do We Need Specialist Security Distros?

Packt
24 Oct 2009
4 min read
I talk with Ryan Berens, from Guardian Digital makers of EnGarde Linux, to understand their role in the Linux distribution space. EnGarde is distributed in two flavors -- one of which can be had for gratis. EnGarde is what you'd call a minimalist distribution that you'd install on your server to run critical services. It's also popular for its one-stop WebTool remote administration tool. Mayank Sharma: Why do we need a specialist security distro? Why is this better than the 'adding security apps to an existing distro on the server' approach? Guardian Digital: These platforms exist to fulfill a significant need in the market. Many users want a hardened platform because locking down a system can be both difficult and time-consuming. The challenge of creating a secure foundation requires a holistic view over all of system resources, not only at default settings, but as configurations need to change. Hardened platforms, designed and built with security from the ground up, create a much more streamlined, integrated system that ensures a system can stay secure. Bloated distro's can be very insecure by default and overcoming that initial state won't be as effective as building security in from the ground up to ensure that tools all work together to minimize access to and control over resources. Simply adding a couple applications doesn't mean they necessarily 'play' well with other apps or the OS in order to perform as securely as needed. MS: What is involved in packaging a secure distro? Is there more to it than just packaging firewall and network monitoring apps? GD: So much more. As I said in the previous answer, a strong focus is on integration and default security. There are processes that could be left open to abuse, that would otherwise get overlooked. One simple example is that EnGarde sets the ls command to have the least privilege, and doesn't allow write access to /bin/ls. Ubuntu, for example, allows write access to the command ls by default. If a user isn't aware of this, it could be a hole in their system that can be compromised. The point is that adding apps that provide some kind of security process doesn't by any means address the internal security of the platform and how it interacts with other processes and applications. Sure they help, but using them, and using them securely are two different things. How does the system treat passwords? What tools does it use for ordinary, "non-security" apps? How does it integrate them? Does it use best-practices for secure remote access? So on and so on... MS: What are the main differences between the free Community and the commercial Enterprise releases? GD: Our free community platform is really more of a "bleeding edge" platform. It is a great way for users to set up a secure server and incorporate new and secure functionality, but it isn't always in the kind of stable development that is demanded for a corporate environment. Also, EnGarde Professional comes with our portfolio of secure, business-critical applications - SMS (Secure Mail Suite) for routing and securing email from Spam/Virus's for tens of thousands of users - SurfSecure, our web enforcement filter for corporate networks, and so on. These applications aren't available for the community (and most of the time, they wouldn't need to be, not at that level of scalability). And lastly is the service and support for all users. All implementations of EnGarde Professional are fully supported by our dedicated staff of security specialists, with service options for Installation, Remote Monitoring, custom development and much more. MS: Who would be the Community Edition's primary users? Can I use it as a secure desktop OS? GD: The primary users for our Community Edition are really administrators interested in providing a secure server foundation. EnGarde Community (as well as EnGarde Professional) is solely engineered for server operations. This is not a desktop OS for running spreadsheets or playing music - this is about secure, usable functionality for your servers. Even though the corporate version is recommended, there have been numerous examples where EnGarde Community was implemented in a small office environment. MS: What Package management does EnGarde have? Do you maintain your own repository of software? GD: We utilize RPM and yes we do maintain our own repository. The platform is engineered from the ground up, and this means that we choose secure packages, and then integrate and develop them expressly with security in mind. MS: Thank you for your time Ryan and wish you luck for the future.   Some more articles by Mayank Sharma: Zen Gift of Education Making a Complete yet Small Linux Distribution
Read more
  • 0
  • 0
  • 1560

article-image-securing-small-business-server-2008
Packt
24 Oct 2009
5 min read
Save for later

Securing the Small Business Server 2008

Packt
24 Oct 2009
5 min read
To do this, we are essentially completing the tasks in the home screen of the Windows SBS Console, which should look like the following screenshot. Assumptions I'm assuming that you understand the concepts of firewalls and ports; otherwise, you will struggle to safely configure your network. I'm also aware that OneCare, for servers, only provides an introductory offer for anti-malware and another product will be required; however, it is easier to describe the installation of one product rather than trying to answer for all products, so I'm using OneCare as a template. You will, however, need an anti-malware product that is server aware, or need to exclude server product locations such as the exchange data stores and other locations. Network security configuration There are a few areas where we can improve the security of the network. They are around the firewall, reducing the traffic that arrives at the SBS 2008 server, and the security certificate that is used to secure and identify the server communications. Configuring the firewall ports You will need the following ports configured on your firewall to direct traffic to SBS 2008: If you were using SBS 2003, then you can close down ports 444 and 4125, which might have previously been open. Loading a third-party security certificate SBS 2008 creates a security certificate to secure its communications. Certificates are only valuable if everybody seeing them trusts the system that issues the certificate. All computers that are part of the SBS 2008 network trust the SBS 2008 server, so trust is achieved in this way. For those that are not part of the SBS 2008 network, a special certificate must be loaded onto those machines so they will trust SBS 2008, else they will provide warnings to users about the integrity of the communication. There are organizations called Certificate Authorities who have established trust in the marketplace and most IT systems trust the certificates they issue. If you wish to have a more publically trusted certificate, then you will need to purchase one of these. One area where third-party certificates are often needed is when using mobile devices, to enable the loading of the SBS 2008 certificate onto the phones. Without the certificate on the phone, synchronization of Outlook information to the phone cannot take place. Importing a certificate If you already have a certificate or have purchased one and have been sent a file containing the certificate including the private keys, then you should follow this process. There are two steps to follow: Importing the certificate into the Local Computer Certificate store Assigning the certificate using the SBS Console Importing the certificate Start Windows SBS Console (Advanced Mode) from the Start menu and click on the Network tab and then the connectivity button. As this is the advanced console, you will see extra tasks available on the righthand side. Click on the Manage certificates task—if this is not present, check you are running the Advanced Mode console: it will say so in the title bar. This will run a management console with the certificates for your computer made visible. Expand the Personal tree and right-click on Certificates and select Import from the All Tasks menu item. Click Next to pass through the welcome screen for the Certificate Import Wizard and then click on the Browse button to locate the certificate. Then, click on Next to continue. You will now be required to enter your Password to enable access to the key. I would put a check mark in the two remaining check boxes to Mark the key as exportable to enable you to export the certificate should you need to in the future and include the extended properties. Then, click on Next. You will be required to confirm the location, which should be Personal and again click on Next. If it is not set to Personal, click on the Browse button and change the Certification store to Personal. Now click on Finish to complete the process and you will see a message stating that The import was successful. Close the Certificates Management console. Assigning the certificate In the Windows SBS Console, click the task Add a trusted certificate to start the process. Click on Next to skip past the introduction. If you have assigned a certificate before, you will be told that A valid trusted certificate already exists and you have the choice of renewing your existing certificate or replacing it. Select I want to replace the existing certificate with a new one and click on Next. If you have not added a trusted certificate before, then you will not see this screen. On the Get the certificate page, select the option to use a certificate already installed on the server and click on Next. The certificate that you installed will show in the list with a Type of Trusted, while the certificates issued by SBS 2008 will show as Self-issued. Select your Trusted certificate and click on Next. Click on Next to start the process and then Finish to exit the wizard.
Read more
  • 0
  • 0
  • 6484
article-image-gobolinux-interview-lucas-villa-real
Packt
24 Oct 2009
6 min read
Save for later

GoboLinux: An Interview with Lucas Villa Real

Packt
24 Oct 2009
6 min read
GoboLinux is popular for its filesystem hierarchy which breaks away from the traditional Unix Filesystem Hierarchy Standard (FHS). So basically you wouldn't find any /etc or /usr directries under Gobo. In turn, files of a particular program are stored in their own separate directories like /Programs/GCC/2.95.3/lib. This means Gobo's package management system has its advantages since users can now install multiple versions of the same program without conflicts. To find out more about Gobo and why it does things the way it does, I talk to one of its main developers Lucas Villa Real. Mayank Sharma: So why did you break away from the traditional FHS? Are there any particular advantages? Lucas Villa Real: The major aim was to have a simple way of creating and sharing binary packages from programs compiled and installed from their source code. Splitting the filesystem tree into per-program subtrees was the most logical thinking, as packages could be created just by compressing its directory, or removed by deleting that. Another interesting advantage is that more than one version of the same program can be installed in the system at a given time, as each version lives inside its own directory. And this gives us a very unique feature: no database is needed to tell which packages are installed and what files each of them offer; that's just a matter of checking the directory contents inside /Programs. MS: How do you maintain UNIX compatibility in the background? Doesn't this effect the speed of complex programs like OpenOffice.org? LVR: Every time a new application is installed in GoboLinux, its contents are linked inside a global /System/Links tree. This tree presents subdirs such as Executables, Libraries, Headers and Shared, among others. So, having a centralized point where programs' contents can be reached makes it possible to achieve UNIX compatibility by presenting symlinks that point the desired legacy entry to the /System/Links corresponding one. And this comes with a great advantage: by having entries such as /bin, /sbin, /usr/bin and /usr/sbin pointing to /System/Links/Executables, the applications will always find what they're looking for—given that the file exists. This extra level of indirection introduced by the symlinks require one more step when opening or getting information on files, but that's a really cheap and fast procedure, especially when compared to the entire file manipulation operations. And anyways that already happens in traditional systems when an application tries to open a shared library, which is usually presented as a symlink to the real shared object. It's interesting to note that although we have those compatibility symlinks they're all hidden from the end user by default, thanks to a kernel extension written by us. MS: I've read Gobo's filesystem makes installing applications easier. But wouldn't this require application developers to package their apps to conform with Gobo's filesystem? LVR: Many application developers are already doing that by using autoconf, automake or just by writing well behaved Makefiles. In fact GoboLinux doesn't require anything special from application developers other than the usual care that they should already take regarding portability in their projects. MS: How does Gobo's "design" let users install multiple versions of the same app? How about uninstallation? LVR: Every installed program gets its own directory, such as /Programs/GCC/4.2.1. That avoids conflicts  with files coming from different versions, as they'll be stored in a different location (eg: /Programs/GCC/4.1.1). For uninstallation, it's just as simple as removing the desired program or version from the /Programs tree. The broken symlinks that'll be left over can be either treated automatically by a daemon such as the GoboLinux Listener or manually by a script shipped with the distribution. MS: So why haven't other distros taken to Gobo's filesystem? Is it difficult to implement from the distro developer's point of view? LVR: It's difficult, because they would have to make many important changes to their package management scripts and to many existing distro-specific applications, such as boot scripts configuration, for example. MS: Apart from the filesystem what are the other features that make Gobo unique? What's a rootless Gobo install? LVR: A Rootless GoboLinux is a set of scripts that makes it possible for anyone running an UNIX-like operating system to run GoboLinux tools inside their own home directory. That makes it possible for users in eg: Mac OS X to run Compile and get the program installed in a GoboLinux-like structure. And that doesn't require special admin privileges, as everything is installed inside the directory specified by the user (usually their home dir, or another where he/she has write access to). Answering the first question, we have, as principle, to try to ship every package as close as possible to the original one, avoiding patches that modify their behavior. This contrasts with many distributions out there, which usually try to merge as many patches as possible to enhance applications (and sometimes breaking them). Also, the alternative design of Gobo tends to attract a very diverse group of people who like to "think outside the box", such as users of alternative shells and lesser-known programming languages. They usually contribute with many good ideas when we're brainstorming for new features. MS: What does the immediate future hold for Gobo? Any areas where you could use some help? LVR: We're doing a series of snapshot releases in the process of stabilizing 014. The best help we can use now is to get people to download those snapshots, give them a try and report any problems they find at http://bugs.gobolinux.org. We're also always open for new contributors to help maintain the "recipes tree" for the Compile tool. MS: Where do you see Gobo in a couple of years? LVR: In a couple of years, I expect Gobo to be fully grown from being a small niche distro into a larger community. The main technical foundations have been laid and we already have a small but vibrant community of users. We still have some more work on infrastructure ahead of us but from now on I think the prospects are the best possible. MS: Thanks for you time Lucas, and best of luck developing Gobo.   You might also be interested in reading: The Economics of Open Source Donations 2007 Open Source Content Management System Award  
Read more
  • 0
  • 0
  • 3916

article-image-economics-open-source-donations
Packt
24 Oct 2009
8 min read
Save for later

The Economics of Open Source Donations

Packt
24 Oct 2009
8 min read
Donations play a crucial role in supporting Free and Open Source Software projects. At times readers will write in to share their positive experience with a utility or program or a distribution that I have written about. Now don't confuse them with your average technical-bent-of-mind Linux user. These are accountants, home-office businessman, and even carpenters and plumbers, who've saved a lot of money thanks to open source software. And they have one question in mind -- how do I help the person behind the program? I generally recommend everyone to find the project's forum boards, or IRC channel, or mailing list and try and help other new users. Some do, and eventually even graduate to write documentation, like simple installation steps or how to install dependencies, in forum board posts. But some readers are incapable of even that kind of help. After my interview with Sebastian Trüg of K3b, a reader wrote in surprised that the software he had been using for writing MP3s for his grandchildren, ever since his grandson installed Kubuntu on his box, was written by a college student. He wanted to help, but didn't know how. K3b just worked for him. His demands from the distribution were minimal and so was his technical understanding. Recommending such people (and in fact others too) to donate to their favorite projects, isn't a bad idea. In fact I point them to Ladislav Bodnar's DistroWatch donations program to get a feel for the idea. I am not sure how many people take my advice seriously and do actually donate, but a couple of them wrote back after my interview with Bodnar, where he expressed surprise about the lack of response or even a courteous "thank you" from big projects after receiving donations. "What do they use the money for", they all wanted to know. Some suggested themselves that it's because "they are such big groups, and they all have jobs." So why are donations important? Since it seems to bother so many people, I thought I'd ask someone in the know. Fabio Erculiani, lead-developer of the two-man development team that churns out the popular Gentoo-based Sabayon Linux lists some common expenses of running a FOSS project. "We have hosting bills," explains Erculiani who has passed on a job offer by Google to complete his studies, "backup systems such as NASs, RAID arrays (hard drives tend to break often here... I had two breakages in around 6 months), new hardware, especially video cards, processors, wifi cards (usb, pcmcia, pci). We also bought a Mac Mini with a fundraiser at the end of 2006. I think that the most important thing, at our stage, is to keep a good and tested support. We also need to finance the development. This means two things: first, paying the electricity to run 2-3 servers 24/7/365 and secondly, spend time on long term projects, like Entropy, our upcoming new binary package manager." That's quite a list. "I think donations are important for projects that are done by developers in their spare time like I did the first 8 years of K3b," agrees Sebastian Trüg, lead-developer at K3b, the popular CD/DVD burning app. Trüg now works full time on free software, sponsored by Mandriva and spends about 30% of his time working on K3b. If you think donations aren't important for big projects whose developers have regular jobs, think again. "Donations are critical to the CentOS Project," comments Johnny Hughes, one of CentOS's 14 volunteer developers that develop this enterprise-class distribution. "Money is required to allow developers to attend FOSS events outside their area. Money and hardware donations are also required for development machines to build CentOS and for a network to distribute CentOS. We have been much more successful at obtaining hardware donations than at obtaining monetary donations, but both are important." But for Samuel Baggen, who works full-time on his popular Elive Live CD, donations are not just important, they are essential. "The donations received are required," explains Baggen, "so I can work on Elive full time without needing a regular job. With enough donations I can spend all my time on Elive, support the community and respond and work on their feedback." With enough donations Baggen hopes to start paying for serious services for Elive like professional designers, coders, etc. Encouraging users to donate Since it's such a critical component to their existence, many projects take great measures to get users to donate. Donations to the GIMP project for example are tax exempt in the US. Many projects also throw in a little extra for their donating users. Erculiani offers Sabayon branded goodies and is thinking of offering a premium membership where users will be able to get extra stuff like dedicated mirrors and discounted prices in the e-shop. "Last year we bought two new Dual Core processors," he says, "and this year I have finally updated my server with a new CPU, mainboard, RAM and two hard drives. We have also paid the hosting service and even gave some money to other projects." Hughes though doesn't like the idea of providing faster mirrors, goodies, or anything else extra about their distribution to people who donate. "As we believe strongly in free software," underlines Hughes, "we want CentOS to be available to everyone, and hope that they will use it and then donate." But CentOS does provide hardware donors with free advertising on their website and in the future will be offering some paid support for users that want that service. Trüg has only asked for donations once. "I hope that users will get the idea themselves :)." He also believes that since he offers no extra goodies, users will only donate out of good will. When he had that fund raiser for new hardware, Trüg overshot his goal by 500%. Currently, you can buy the official K3b Handbook which is so far only in German but an English translation will be available soon. Baggen on the other hand has tried a more "adventurous" strategy to get users to donate and was even criticized by some users. He made donations mandatory to download stable releases of Elive. "There are many users," shares Baggen, "who only donate $0.01 but I don't worry about that too much because the users who are satisfied with Elive and support a better future for Elive will bring more cool people into the Elive world. The donation for download system is sufficient enough to maintain the future of the project. More donations though will mean more features and a brighter future. We will be looking into fun ways to raise money in the future." Baggen has recently started offering paid bonus-disks that allow users to install popular software with the click of a button. But what really triggers donations? Are goodies motivating enough to donate? I am skeptical. Without blowing my own trumpet, I wonder if that K3b user would have donated (if he ever did) if I hadn't interviewed Trüg. Hughes agrees there is a connection between a project's popularity, the press coverage it receives and its user base. "How a project gets that press," he explains, "is obviously to provide a quality product that people need and are willing to write and talk about." Contests and awards, according to Hughes, provide another avenue for getting press coverage and expanding the user base. "Since only a small percentage of users actually donate, the bigger your user base, the larger the donation group." That might work for a big project like a complete distribution but for an application like K3b, a broad user-base doesn't guarantee donations. Trüg nails this perfectly. "The way I experienced it," he shares, "there is a phase in which the project becomes popular, that is, when people discover it as a better alternative. That is when they donate the most. Now, K3b comes with every distribution and is the default burning application which means there is no more "discovering of a new project". The result is that the donations are less frequent." Final thoughts Donations are important to FOSS projects, big and small. Some projects go out of their way to ensure donating users get more in return than the satisfaction of helping their favorite project. While it would seem a project's popularity and a sizable user-base would ensure monetary support, as applications become more reliable and just work out of the box, they might adversely affect a project's chances of receiving donations. But one thing's certain. Irrespective of whether you decide to donate or not, the developer or developers behind the project will continue hacking. Spirit, after all, cannot be donated.   You might also be interested in reading: Open Source Receives Royalties Boost 2007 Open Source Content Management System Award
Read more
  • 0
  • 0
  • 4424

article-image-service-versioning-soa
Packt
24 Oct 2009
15 min read
Save for later

Service Versioning in SOA

Packt
24 Oct 2009
15 min read
Making a Change For the next few months, the Center of Excellence paid off. Projects were identifying services early in the lifecycle. Those same projects were successfully identifying other potential consumers of these new services. Implementation technologies were being chosen correctly and interface design was being properly done. Most importantly, everyone felt the SOA effort was on track. By this time, it had been almost two years since Spencer's team developed the Customer Information Service for the auto insurance and home insurance divisions. While these two groups were very happy with the results, no additional teams had leveraged it. Outside of the annuity project, this wasn't a case of projects going in another direction; it was more due to lack of opportunities. That was about to change. Spencer was eating lunch in the cafeteria when Ramesh walked up. "Mind if I join you, Spencer?" "Hey Ramesh, it's been quite some time. Go ahead and pull up a chair." "Do you remember two years ago you tried to convince Ryan to use your Customer Information Service?" "I sure do. I didn't want to show my face in the annuity area for about a month after that. He really wasn't very receptive to the idea." "Well, I have some good news and some better news for you. The good news is that about six months later, Ryan decided to leave Advasco. The better news is that we've now got a major initiative to revamp a number of our systems in the annuity department. I'd like to take advantage of the Customer Information Service as part of that effort." "That's good news Ramesh. I didn't harbor any resentment towards Ryan, but I'm certainly happy about having another potential consumer for the Customer Information Service. I'll put you in touch with the service manager for it." "Thanks Spencer. That would be great. We're just getting started on our architecture, so the timing is perfect." "Let me know if you run into any problems. I'm still part of the SOA Center of Excellence, so it's still my job to make sure it goes well!" Spencer put Ramesh in contact with the service manager for the Customer Information Service, Maria. Maria had recently transferred over after her work on the account maintenance effort, and now had responsibilities for the Customer Information Service. In the meeting with Ramesh, she brought her technical lead, Craig, with her "Spencer told me that you're interested in utilizing the Customer Information Service in some of the new systems you're building in the annuity department, Ramesh." "That's right. We're rewriting a number of our systems, and based on what I remembered from Spencer two years ago, I thought we might be able to leverage the service." "Great, I'd be happy to help you out. This is Craig, the technical lead who covers the Customer Information Service. He's here if you've got any technical questions. Have you had a chance to review the information available in the service repository?" "I have. I reviewed the service interface, and while it certainly looks like there's enough there to warrant using the service rather than building our own, there's also a number of additional things that we'll need." Craig responded, "What kind of changes are you looking for? Are there new operations that you need that are specific to the annuity area?" Ramesh said, "There are two or three operations that we'd like to see, but most of the changes are actually in the message schemas for the existing operations. There are some additional attributes that we need, and some of the relationships between the attributes are different in our representation." For the rest of the meeting, Ramesh and Craig went through the changes that Ramesh wanted to be made to accommodate his needs. In the end, it was clear that some changes to the existing schemas would have to be made. Maria asked, "We're going to need to go back and look over these changes, along with the integration approach for your existing database. What does the schedule for your efforts currently look like?" Ramesh replied, "We're still in the initial stages of planning, which is why I wanted to make sure I talked to you now. Right now, the project sponsors would like to have something within six months, but they also know that nine months is far more likely. Since I have some flexibility in my schedule, why don't you take a week to look into the effort required for the changes, and let's work out the schedule then. Does that work for you?" "That works for me. We'll get back to you next week with what we think it will take to implement the changes." On the way back to their desks, Craig commented to Maria, "You know, while I don't have any concerns about getting the work done for Ramesh, I do have some concerns on how these changes are going to impact our existing consumers. Some of these changes are going to break the existing interfaces." Maria said, "That is a concern. I know that there aren't any resources available to do any work on the home insurance side of things. Any suggestions on how we should handle this?" Craig said, "Well, we definitely should make the existing consumers aware that a change is going to be made and at least get a clear idea of what the impact will be. If you can take care of that, I can take this to Spencer and the SOA Center of Excellence, and see what suggestions they have." "That sounds like a good plan to me," replied Maria Over the next week, the Customer Information Service team did the analysis required to estimate how long the changes would take to implement. Maria used the communication features of the service registry/repository to push out a message to the existing consumers about the pending change, and as she suspected, the biggest problem was going to be the home insurance system. Due to other priorities, the earliest they could even begin to make changes to their consumer would be nine months from now, potentially three months after the service needed to go live. Craig met with Spencer and explained the problem to him. Spencer agreed to facilitate a decision-making session to explore the different options. Representatives from all of the existing consumers were there, along with Ramesh, Craig, and Maria Spencer started the meeting, "I'm sure all of you saw the notification from Maria last week that some changes are necessary to the Customer Information Service in order to support its usage by the annuity department. The problem that we face is that these changes will break the existing consumers of the service, and not all of you can make the changes to your systems in the currently proposed timeframe. Let's start out by listing all possible options, regardless of whether we all presently agree or disagree on their viability." Craig started out, "Well, if we're listing all possible options, the first one is toupdate the service, and then get whatever push we need from management to get resources allocated to the consuming systems so they can make the changes in the time required." Maria replied, "Come on Craig, you know that we can't just pull resources off projects that easily." Jason, from the auto insurance department, added, "Aren't all of these changes a result of the annuity department? Why can't they just include modifying our applications within their project scope? They already have resources allocated to their project." Paul, from the home insurance department, replied, "Do you really want some developers that have never seen your application before mucking around in your code? I know I don't." Spencer said, "Let's remember, we're listing all options, regardless of whether we all know that the option won't fly. We want to make sure we've explored all of the options. I'm going to just leave this as one option, since we still wind up with the same result, regardless of where the resources come from. I'll capture the concerns about the option." Paul, from the home insurance group, added, "Okay, here's another option. Why don't we leave the existing service in place, and simply have the annuity project write a new service that just they use. Then, none of us using the existing service would be impacted." Craig replied, "That's true, but isn't that going against everything we're trying to do with SOA? I thought we were trying to avoid redundant implementations of the same capability." Spencer replied, "Duly noted, Craig. Just as with the last option, let's keep it on the board, and I'll make sure that your concerns are captured. Paul, that option actually triggered another one in my mind. In addition to having Maria's team write the new service for the annuity system, why couldn't they also keep the existing version of the service available in production for the rest of you? You can then migrate as your schedules allow." Paul and Jason both replied in tandem, "That would work for us!" Maria jumped into the conversation, "While I'm sure it would, that sets a very dangerous precedent for my team. How many versions of the service are we going to have to maintain? While it's a little bit better when all the implementations are owned by one team, we still have multiple implementations." Jason then asked, "Isn't there a way to make the new service backwards compatible with the messages associated with the old service? That way, Maria's teamwould only have one implementation, but we could each continue to use our existing interface." Spencer replied, "That's a very good question Jason. While we all agree that the service interface needs to change to support the annuity department's requirements, I don't know that any of us have thought about whether we can easily transform messages associated with the previous version to messages that will work with the new version, and vice versa. Craig, you're the one most familiar with the new proposed schemas. Do you think we could leverage XSLT to apply transformations for backward compatibility?" "Yes, I think it's possible. The only concern I have is what impact this will have on the service implementation. Working with XSLT within Java code isn't the easiest thing to do, and as we make future modifications, that's just going to get uglier and uglier." Spencer said, "There's another option for that. A year ago, we put some XML appliances in place for security purposes. I know they have XSLT capabilities and they're already in the request path." Craig replied, "Of all the options, I think that one would work out the best. I really don't like the idea of maintaining multiple versions of the service, and having to maintain all of that XSLT code within the service is only slightly better. Allowing the annuity group to write their own goes against everything we're trying to do with SOA." Spencer said, "Well, we know where Craig stands. Are there any other options that we should look into? No? Well, what does everyone think?" Paul was first, "We know that we're not going to find resources to make the changes in all of the consumers at the same time, so that option is out. Likewise, it doesn't make sense for Ramesh's team to write their own service given our SOA goals, so that one is out, too. As for whether Maria's team maintains two versions of the service or utilizes some transformations somewhere, it really doesn't matter to me. From my perspective, both options give me the freedom to migrate at the time that works best for me." Jason immediately added, "I agree with everything Paul just said." Ramesh then offered his opinion, "Well, I certainly know that I don't want to give up any of my developers to work on Jason's and Paul's systems. We need every developer we can get right now. As for writing our own service, we've already been down that path two years ago, and now we're obviously changing the system again. If we had migrated to the service earlier, it would be one less thing that we had to touch as part of these changes. As long as Maria's team delivers my service on time for my projects, it doesn't matter to me what Maria's team chooses to do on their side." Spencer replied, "Well Maria, it looks like everyone else thinks that we need a solution that will allow all of the consumers to continue to use their existing interfaces or the new one, but the details of how that happens is completely up to you and Craig." Maria said, "Let's not jump to conclusions yet. If I'm going to maintain multiple versions, I need some kind of guarantee that the existing consumers will eventually migrate to the new version. If my team allows continuous use of the old interface for 12 months from the time the new interface goes live, would that be an adequate time to complete whatever modifications are necessary?" Jason and Paul thought about it and decided that this was reasonable. For the past three years, they'd averaged an update every nine months. Maria said, "I'll make sure to remind you, early and often, that the old version and its associated interfaces are going to be decommissioned. In the meantime, I'd like to first get the new version built. I'm going to need to keep both versions around initially just to compare messages. Ramesh's team can begin using the new service, and…" As she was talking, she stopped mid-sentence. Spencer said, "Is there a problem, Maria?" She replied, "Well, I was just thinking, how are we going to avoid having two URL's out there? The existing consumers are using a URL that points to the XML appliances, right? We want to apply transformations to that path. What URL will Ramesh's team use? We don't want to try to apply transformations to their requests." Spencer said, "Fortunately, I don't think we'll need to do that. We'll need to talk to the team that operates the appliances to be sure, but I'm pretty sure that the appliances can apply processing based upon incoming attributes on the message. As long as we can determine which requests came from which consumer based on the message content, we should be able to control when transformations happen, while having all the existing consumers using a single URL. We'll obviously need multiple URLs behind the intermediary, but that will be hidden from the consumers." Maria replied, "Okay, that eases some of my fears. Just make sure you find out quickly whether the appliances can handle it or not. Until we find out, can we set up a simple routing rule so that requests from the annuity group go to the new service, while the old ones stay where they are? That way, Ramesh can use the new service as soon as it is available, and Craig and his team can start working on the transformations for backward compatibility. I'd like to wait and see how that work goes before deciding whether to leave both versions out there for 12 months or to leverage the intermediary. We've never used that functionality before, and I don't want to take a chance on impacting Ramesh's schedule in case we run into difficulty. By keeping both services available in production at first, we can eliminate any dependency between the decommissioning of the old service and Ramesh's schedule." Craig added, "From my point of view, that shouldn't be a problem. I can treat the new version as if it were a completely new service, as long as the intermediary shields the consumers from that change. I will need to check how we can manage both versions at the source code level, though." Maria responded, "Good points, Craig. Taking all of this into account, I think this approach poses the least risk overall." Spencer said, "Then we're all in agreement, right? Maria's team will build a new version of the service according to the new interface, and the old interface will be available for 12 months from the time the new service is deployed. Initially, both versions will be available in production, but Maria can decommission the old service before 12 months are up, so long as the new version can be made backwards compatible via XSLT transformations. Maria will notify all consumers prior to decommissioning the old service, since regression testing will be required to ensure that backward compatibility has been maintained. She will also notify all consumers as we get closer to the 12 month cutoff when the older interface will no longer be supported." Everyone in the meeting agreed with this approach, and the teams went off and made it happen. Craig's team investigated the best way to apply the transformations, testing them using the latest Java libraries, as well as the XML appliances that Advasco had recently installed. They found that the XML appliances performed very well, and kept the programming model of the service very clean. While the Java libraries performed satisfactorily, the resulting programming model was not as clean as the team desired. With the use of the routing rules in the appliance, they were able to remove the older version of the service from production, while still supporting the older messages for the full 12 months as promised.
Read more
  • 0
  • 0
  • 1453
article-image-oracle-sql-developer-tool-15-sql-server-2005
Packt
24 Oct 2009
4 min read
Save for later

Oracle SQL Developer Tool 1.5 with SQL Server 2005

Packt
24 Oct 2009
4 min read
Installation and a review of some new features Installation The program [EA2 download -Early Adapter] can be downloaded from the following URL. In the present case the Windows option that comes with JDK1.5.0_06 bundled was used. The downloaded ZIP file, sqldeveloper-5073 (100MB) can be unzipped to any suitable location and from within the sqldeveloper folder you can immediately start using the program. The program can be started by double clicking the executable which has an unambiguous fat green arrow. Review of features Adjustable Look and Feel The look and feel is adjustable. You can choose between 'Windows' and 'Oracle'. After choosing 'oracle' you can choose a variety of themes. The one shown is for 'Desert Yellow'. The View Menu The View menu is better organized as shown compared to the previous version. Tools Menu Tools menu is beefed up as well as shown. External Tools The External Tools sub menu item can find existing tools (browsers, notepad, mdb files) and also using a 4 step wizard allows you to create tools, provided you know the details for accessing them. Wizards Diff Wizard allows comparing objects of same type between schema of source and destination as well update the destination based on source. Similarly the Copy Wizard allows you to copy objects from one database schema to another. Versioning Support Versioning support is another new feature in this version.SQL Developer provides integrated support for CVS [concurrent versions system] and Subversion in its source control. CVS allows repository creation on the local PC or, on a remote machine. Source files are held in folder modules. In the case of Subversion the access to the repository is by means of a connection and this is where the master copies are held, files are checked out to a local working folder. Run menu item The Run menu item also contains the debugging options as shown. In the previous version Run and Debug were two menus. Migration Menu The Microsoft Access Exporter can export from 97,2000,2002, and 2003 like in the previous version (1.2) and seems to be essentially the same as the previous version. This version can now create off line migration scripts to ASE 15 and Sybase 12 in addition to several versions of SQL Server 7,2000,2005 and MySQL (3.23,4,5) Connecting to SQL 2005 databases As described in the previous referenced articles at the beginning  you can establish a connection to the server by clicking on the Connection node (positive green sign) in the first figure. This opens New / Select Database Connection window where you will see only Oracle and Access. This is because, at this point no JDBC drivers have been specified for connecting to the other three servers, SQL Server, MySQL, and Sybase. There are two ways you can register JDBC drivers for these databases. For SQL Servers you require the jtds.jar file from the SourceForge.com web site. In the first method you need to go through Tools|Preferences|Database|Third party JDBC Drivers| to find the path to the file as shown in the next figure and use the browse key to locate the driver and add it. The driver file should be in the correct path for the application to find. In the other method that is used here, which in the opinion of the author is simpler, is to go through Help|Check Updates... This brings up the Step 1 of wizard as shown. Read the instructions in this window. Now click Next. This takes you to the next window as shown.   The needed item is already checked. Click Next. The window that comes up next shows compatible drivers for the databases. Choose items needed by placing check marks. In this tutorial both the SQL Server and MySQL drivers were chosen. Click Next. In the window that shows up agree to the licensing[GNU Public] terms after reading the terms. Click on Next in the final window of Step 4. When Step 5 "Download" windows opens the login window also opens. As these drivers are downloaded from the Oracle site, you will have to insert your Oracle login information. Step 5 screen shot is not shown. You will be adding both the JDBC drivers on the final step. Click Finish. In order to install the updates you chose, the SQL Developer 1.5 needs to restart, and it restarts when you click on Yes in the Confirm Exit window. Do you want to Migrate User Settings?  window shows up again. For this article it is a No again. The Oracle SQL Developer window gets displayed. Now you open the screen.  You will see all the five database tabs in the New / Select Database Connection with default connection to the Oracle 10G XE on the local machine[Screen shot not shown].
Read more
  • 0
  • 0
  • 3893

article-image-type-subtype-and-category-patterns-logical-data-modeling
Packt
24 Oct 2009
4 min read
Save for later

Type, Subtype, and Category Patterns in Logical Data Modeling

Packt
24 Oct 2009
4 min read
Before I cover the three logical data modeling patterns, let's review briefly how we typically model a type. Let's say you're in a car business. You can model a car as a Car entity shown in the figure below; its sample data values are in following table (I just use six numbers for the VIN, instead of the 17 characters VIN standard, in the sample). VIN (Vehicle Identification Number), the car serial number, is the unique key of the Car entity. The other attributes (Brand, Model, Year, and Manufacturer's Suggested Retail Price) can be thought as the type of a specific car  with a unique VIN. So, the type is in the entity itself. Note that you can have more than one car—each with a unique VIN—that have the same type, such as the first three Honda Accord in the sample table. If you have many cars of the same type, or, you have many car types and they're dynamic (have changes:  new, update, delete; for example, the update on the MSRP), you can easily recognize that this model is then not suitable—type model is a better solution.   VIN Brand Model Year MSRP 123987 Honda Accord 2007 20,000 456321 Honda Accord 2007 20,000 555666 Honda Accord 2007 20,000 678345 Toyota Corolla 2008 21,000   ...   ...   Type The ER (Entity Relationship) diagram of the following figure shows Car Type and Car entities and their relationship. Car Type defines each type of your cars—a type is a definition of something. The Car is the individual car, each with a serial number (Vehicle Identifier Number) that has a specific type defined in the Car Type. You can think of a Car Type entity as a template used (instantiated) by an individual car. Now you can have as many car types as you need, and type changes don't affect the cars. Table two tables after the figure contain sample data values of the Car Type—Car data model. Note that a car can belong to one car type only. On the other hand, a car type can be the type of many cars.   Car Type Key Brand Model Year MSRP 1 Honda Accord 2007 20,000 2 Toyota Corolla 2008 21,000 ... ... ... ... ...       VIN Car Type Key Owner 123987 1 Djoni Darmawikarta 456321 1 Kevin Peter 555666 1 Rao Ganipineni 678345 2 Sherman Chang ... ... ... How do we deal with product that doesn't have an individual identifier? Can we apply the same data modeling structure to, for example, commercial books? You certainly have inventory; each Inventory is an instance of the Book Type. The following figure shows the Book Type—Book data model and its sample data values, respectively. You can also apply the same data model to intangible thing, such as Service; an individual service may be identified by, for example, a contract number. The following figure  and the last table in the article show the Service Type—Service data model and its sample data values, respectively. Subtype What if you have cars that have different sets of attributes, meaning different types? You can model the different types as subtypes. The following figure shows two subtypes of the Car Type entity: Passenger Car Type and Truck Type. The Car supertype has the common attributes of its subtypes while each of the subtypes has its different attributes. Category While Type is a definition of something, Category is a way to categorize something. While Service can be of only one type, it can be of more than one category—its relationship to Category entity is many-to-many. An example of category for Service is shown in the following figure and its sample data values in the table after it. Note that you need to resolve the many-to-many relationship at implementation time   Service Category Key Service Category 1 Bundled 2 Outsourced 3 Onsite 4 Software 5 Hardware ... ... Summary Type, Subtype, and Category are similar patterns for data modeling. This article introduces these three patterns and shows their differences. One or more of them exist in most data model. If your initial data model doesn't have any one of them then you should re-inspect the data model.
Read more
  • 0
  • 0
  • 8479
Modal Close icon
Modal Close icon