Search Results

Search found 4685 results on 188 pages for 'proper'.

Page 1/188 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • strategy for choosing proper object and proper method

    - by zerkms
    in the code below at first if statements block (there will be more than just "worker" condition, joined with else if) i select proper filter_object. After this in the same conditional block i select what filter should be applied by filter object. This code is silly. public class Filter { public static List<data.Issue> fetch(string type, string filter) { Filter_Base filter_object = new Filter_Base(filter); if (type == "worker") { filter_object = new Filter_Worker(filter); } else if (type == "dispatcher") { filter_object = new Filter_Dispatcher(filter); } List<data.Issue> result = new List<data.Issue>(); if (filter == "new") { result = filter_object.new_issues(); } else if (filter == "ended") { result = filter_object.ended_issues(); } return result; } } public class Filter_Base { protected string _filter; public Filter_Base(string filter) { _filter = filter; } public virtual List<data.Issue> new_issues() { return new List<data.Issue>(); } public virtual List<data.Issue> ended_issues() { return new List<data.Issue>(); } } public class Filter_Worker : Filter_Base { public Filter_Worker(string filter) : base(filter) { } public override List<data.Issue> new_issues() { return (from i in data.db.GetInstance().Issues where (new int[] { 4, 5 }).Contains(i.RequestStatusId) select i).Take(10).ToList(); } } public class Filter_Dispatcher : Filter_Base { public Filter_Dispatcher(string filter) : base(filter) { } } it will be used in some kind of: Filter.fetch("worker", "new"); this code means, that for user that belongs to role "worker" only "new" issues will be fetched (this is some kind of small and simple CRM). Or another: Filter.fetch("dispatcher", "ended"); // here we get finished issues for dispatcher role Any proposals on how to improve it?

    Read the article

  • When does "proper" programming no longer matter?

    - by Kai Qing
    I've been a full time programmer for about 8 years now. Web based mostly, ranging in weird jobs for clients. Never anything I "want" to do. So my experience is limited to what I've been contracted to do, having no real incentive to master anything in particular. So here's my scenario and ultimately what I wonder about... I've been building an android game in my spare time. It's using the libgdx library so quite a bit of the heavy lifting is done for me. I don't read much of the docs cause unless it's in tutorial format I will just not care, and ultimately most of my questions have already been asked on stackoverflow. I get along fine and my game works as expected... Suspiciously well, even. So much so that I wonder why one should bother to be "proper" when coding if the end result is ultimately the same. To be more specific, I used a hashtable because I wanted something close to an associative array. Human readable key values. In other places to achieve similar things, I use a vector. I know libgdx has vector2 and vector3 classes, but I've never used them. When I come across weird problems and search stackoverflow for help, I see a lot of people just reaming the questions that use a certain datatype when another one is technically "proper." Like using an ArrayList because it does not require defined bounds versus re-defining an int[] with new known boundaries. Or even something trivial like this: for(int i = 0; i < items.length; i ++) { // do something } I know it evaluates item.length on every iteration. I just don't care. I know items will never be more than 15 to 20 items. So why bother caring if I evaluate items.length on every iteration? So I wonder - why does everyone get all up in arms over this? Who cares if I use a less efficient datatype to get the job done? I ran some tests to see how the app performs using the lazy, get it done fast and don't look back method I just described versus the proper, follow the tutorial and use the exact data types suggested by the community. The results: Same thing. Average 45 fps. I opened every app on the phone and galaxy tab. Same deal. No difference. My game is pretty graphic intensive. It's not like it's just a simple thing. I expected it to perform kind of badly since I don't care to optimize image assets or... well, you probably get the idea. I'm making the game for fun. As a joke, really. But in doing so I'm working outside the normal scope of my job, which is to always follow the rules and do it the right way. So to say, I am without bounds here and this has caused me to wonder why I ever really care to be "proper" So I guess my question to you is this: Is there a threshold when it no longer matters to be proper? Is there a lasting, longer term consequence to the lazy, get it done and don't look back route? Is it ok to say - "so long as it gets the job done, I don't care?" Disclaimer: When I program my game, I am almost always drunk. I do it to remember why I got into this stuff to begin with because the monotony of client based web work will make you hate being a programmer. I'm having a blast and my game is not crashing, tests well, performs well, looks good on all devices so far and has no noticeable negative impact on any of my testing devices. I expected failure because I was being so drunkenly careless with my code, but to my surprise, it had no noticeable impact. I am now starting to question the need to be careful. Help me regain the ability to care! ... or explain why it's not a bad thing to not care. Secondary disclaimer: I am aware of the benefits of maintainability. For myself and others. Agreed. But it's not like someone happening across my inefficient int[] loop won't know what it does. As an experienced programmer those kinds of things are just clear on sight. I document the complex stuff for myself knowing I was drunk and will probably need a reminder. Those notes would clarify any confusion for someone who might ever gaze upon my ridiculous game - though the reality is that either I maintain it myself or it fades into time. I'm ok with that. But if it doesn't slow the device down, or crash, then crossing the t's and dotting the i's might actually require more time than it's worth.

    Read the article

  • The Benefits of Doing Proper Keyword Research

    First of all, let's get one thing straight: keyword research is the hands down the absolute base for any marketing or search engine optimization campaign. You can't get absolutely anything done without doing proper keyword research first. The simple reason behind this fact is that you will be needing the results provided by keyword services for everything from the actual content of your website, to future search engine optimization campaigns, pay per click campaigns, and so on.

    Read the article

  • Proper way to implement Android XML onClick attribute in Activity

    - by Austyn Mahoney
    I have used the android:onClick attribute extensively in my XML layouts for my Android application. Example: <Button android:id="@+id/exampleButton" android:onClick="onButtonClick" /> Is it proper to create an Interface to enforce the implementation of those onClick methods in Activities that use that layout file? public interface MyButtonInterface { public onButtonClick(View v); }

    Read the article

  • Everyone's Guide to Building a Website the Proper Way

    What do I mean when I talk about building a website "the proper way"? I'm not going to talk about any one technology in any depth, but what I am going to talk about is how to understand what you require from a website in order to help you make website creation decisions. Understanding what your requirements will be as time goes by is really important now because the decisions you make will stick around in the form of consequences.

    Read the article

  • A Brief Study on the Processes For Proper Search Engine Optimization

    We all know that the SEO is the process to increase the volume of web traffic to a website. But do we all know how the process actually works? To answer this it is essential to have a proper study on the working procedure of the SE and the process followed by the websites to gain more potential visitors through the search engines.

    Read the article

  • Want to Do SEO? Get Proper SEO Training

    Today's interconnected world, he who holds the power of information technology, rules the world. For your business, though old school marketing techniques may still prove viable, it is important to learn the value of Internet marketing as well. To learn SEO, means to get the proper SEO training as well.

    Read the article

  • Autostart app with proper icon in unity launcher

    - by kyleN
    One can autostart an application such that it launches on session start with an xdg desktop file in ~/.config/autostart (or /etc/xdg/autostart). But my application (a python/gtk/webkit/html5 app) when autostarted has a unity (and a unity-2d) launcher icon that is a gray question mark, even though: when I find it in dash, the dash shows the icon I specify in my main desktop file (in /usr/share/applications) when I launch it from dash, the launcher shows the icon I specify in my main desktop file when I add it as a favorite, the launcher shows the proper icon There are two cases where I get the gray question mark icon: autostart launch from terminal (this use case is not essential though and doesn't involve the desktop file anyway: but should/does ubuntu have an xdg desktop file interpreter à la #!/usr/bin/desktop or something) So: what is needed such unity (3d/2d) launcher panel shows the icon specified in an autostart desktop file?

    Read the article

  • Software rendering 3d triangles in the proper order

    - by at.
    I'm implementing a basic 3d rendering engine in software (for education purposes, please don't mention to use an API). When I project a triangle from 3d to 2d coordinates, I draw the triangle. However, it's in a random order and so whatever gets drawn last draws on top of all other triangles (which might be in front of triangles it shouldn't be in front of)... Intuitively, seems I need to draw the triangles in the correct order. So I can calculate all their distances to the camera and sort by that. The objects furthest away get drawn last. Is this the proper way to render triangles? If I'm sorting all the objects, this is n*log(n) now. Is this the most efficient way to do this?

    Read the article

  • What are tangible advantages to proper Unit Tests over Functional Test called unit tests

    - by Jackie
    A project I am working on has a bunch of legacy tests that were not properly mocked out. Because of this the only dependency it has is EasyMock, which doesn't support statics, constructors with arguments, etc. The tests instead rely on database connections and such to "run" the tests. Adding powermock to handle these cases is being shot down as cost prohibitive due to the need to upgrade the existing project to support it (Another discussion). My questions are, what are the REAL world tangible benifits of proper unit testing I can use to push back? Are there any? Am I just being a stickler by saying that bad unit tests (even if they work) are bad? Is code coverage just as effective?

    Read the article

  • Proper fstab entry to mount a samba share in 12.04

    - by JPbuntu
    I am a little confused on the proper fstab entry for a samba share in Ubuntu 12.04 I can get the drive to mount manually by using: sudo mount -t cifs //192.168.2.2/raid_drive /mnt/homeserver -o username=jon,password=password So I tried putting this in fstab: //192.168.2.2/raid_drive /mnt/homeserver cifs username=jon,password=password,iocharset=utf8,mode=0777,dir_mode=07??77 0 0 Which gives me this error in syslog: kernel: [ 2217.925354] CIFS: Unknown mount option mode kernel: [ 2217.936345] CIFS VFS: default security mechanism requested. The default security mechanism will be upgraded from ntlm to ntlmv2 in kernel release 3.3 This guide says to use smbfs although I believe smbfs is deprecated? What is a common fstab configuration for a samba share in Ubuntu 12.04? EDIT: Using the accepted answer below I was initially getting this error message (from dmesg): [ 45.520883] CIFS VFS: Error connecting to socket. Aborting operation [ 45.520990] CIFS VFS: cifs_mount failed w/return code = -115 although it turns out this was due to network connectivity issues, and not related to improper fstab entry.

    Read the article

  • What constitutes proper use of threads in programming?

    - by Smith
    I am tired of hearing people recommend that you should use only one thread per process, while many programs use up to 100 per process! take for example some common programs vb.net ide uses about 25 thread when not debugging System uses about 100 chrome uses about 19 Avira uses more than about 50 Any time I post a thread related question, I am reminded almost every time that I should not use more that one thread per process, and all the programs I mention above are ruining on my system with a single processor. What constitutes proper use of threads in programming? Please make general comment, but I'd prefer .NET framework thanks EDIT changed processor to process

    Read the article

  • Instantiate proper class based on some input

    - by Adam Backstrom
    I'm attempting to understand how "switch as a code smell" applies when the proper code path is determined by some observable piece of data. My Webapp object sets an internal "host" object based on the hostname of the current request. Each Host subclass corresponds to one possible hostname and application configuration: WwwHost, ApiHost, etc. What is an OOP way for a host subclass to accept responsibility for a specific hostname, and for Webapp to get an instance of the appropriate subclass? Currently, the hostname check and Host instantiation exists within the Webapp object. I could move the test into a static method within the Host subclasses, but I would still need to explicitly list those subclasses in Webapp unless I restructure further. It seems like any solution will require new subclasses to be added to some centralized list.

    Read the article

  • What is a proper way of building Winform apps with multiple "screens"

    - by CurtisHx
    What's a proper way of building a Winform app that has multiple 'screens'? For example, I'm trying to write a small backup program (mainly for giggles), and I've been dumping controls and containers onto the form. I'm using panels and group boxes to separate out the different screens (eg: I'm using a panel to hold all of the controls for the "Settings" window, and another panel to show all the current backups that have been set up). Well, my form.cs file ballooned into a massive amount of code, and I feel like I'm doing something wrong. I can hardly find anything in the file, and I'm ready to start over. This project was just for me to expand my knowledge of C# and .NET, so starting a new project is not a huge deal.

    Read the article

  • How to make content display on their proper pages on search engines

    - by Dendory
    So my site has a blog and gallery, both working the same way. There's an index, and each post has a permalink going to the individual entry. However, if I search for some of the content on Google, often it returns a link to the index, just because it happened to have been on the first page when it was crawled, instead of the individual post pages. This is especially true in cases of images. How can I make it so that Google returns the proper pages for the posts instead of just the main page of my site? My whole site is custom php code I made.

    Read the article

  • Can't set proper resolution with a Geforce 520

    - by D0X
    I installed the 12.04 LTS but cannot get my two monitors working. The latest nvidia-current drivers installed, but i just cant set proper resolution. My card is a geforce 520 1 DVI 1 VGA. With the nvidia drivers installed i can set the DVI monitor to 1600x1200 but the VGA no further than 1360x768 (with nvidia-settings). Without the nvidia driver (using the nouveau) it doesn't work either. This same issue i had with 11.10 and i had high hopes for 12.04.

    Read the article

  • Adding proper THEAD sections to a GridView

    - by Rick Strahl
    I’m working on some legacy code for a customer today and dealing with a page that has my favorite ‘friend’ on it: A GridView control. The ASP.NET GridView control (and also the older DataGrid control) creates some pretty messed up HTML. One of the more annoying things it does is to generate all rows including the header into the page in the <tbody> section of the document rather than in a properly separated <thead> section. Here’s is typical GridView generated HTML output: <table class="tablesorter blackborder" cellspacing="0" rules="all" border="1" id="Table1" style="border-collapse:collapse;"> <tr> <th scope="col">Name</th> <th scope="col">Company</th> <th scope="col">Entered</th><th scope="col">Balance</th> </tr> <tr> <td>Frank Hobson</td><td>Hobson Inc.</td> <td>10/20/2010 12:00:00 AM</td><td>240.00</td> </tr> ... </table> Notice that all content – both the headers and the body of the table – are generated directly under the <table> tag and there’s no explicit use of <tbody> or <thead> (or <tfooter> for that matter). When the browser renders this the document some default settings kick in and the DOM tree turns into something like this: <table> <tbody> <tr> <-- header <tr> <—detail row <tr> <—detail row </tbody> </table> Now if you’re just rendering the Grid server side and you’re applying all your styles through CssClass assignments this isn’t much of a problem. However, if you want to style your grid more generically using hierarchical CSS selectors it gets a lot more tricky to format tables that don’t properly delineate headers and body content. Also many plug-ins and other JavaScript utilities that work on tables require a properly formed table layout, and many of these simple won’t work out of the box with a GridView. For example, one of the things I wanted to do for this app is use the jQuery TableSorter plug-in which – not surprisingly – requires to work of table headers in the DOM document. Out of the box, the TableSorter plug-in doesn’t work with GridView controls, because the lack of a <thead> section to work on. Luckily with a little help of some jQuery scripting there’s a real easy fix to this problem. Basically, if we know the GridView generated table has a header in it, code like the following will move the headers from <tbody> to <thead>: <script type="text/javascript"> $(document).ready(function () { // Fix up GridView to support THEAD tags $("#gvCustomers tbody").before("<thead><tr></tr></thead>"); $("#gvCustomers thead tr").append($("#gvCustomers th")); $("#gvCustomers tbody tr:first").remove(); $("#gvCustomers").tablesorter({ sortList: [[1, 0]] }); }); </script> And voila you have a table that now works with the TableSorter plug-in. If you use GridView’s a lot you might want something a little more generic so the following does the same thing but should work more generically on any GridView/DataGrid missing its <thead> tag: function fixGridView(tableEl) {            var jTbl = $(tableEl);         if(jTbl.find("tbody>tr>th").length > 0) {         jTbl.find("tbody").before("<thead><tr></tr></thead>");         jTbl.find("thead tr").append(jTbl.find("th"));         jTbl.find("tbody tr:first").remove();     } } which you can call like this: $(document).ready(function () { fixGridView( $("#gvCustomers") ); $("#gvCustomers").tablesorter({ sortList: [[1, 0]] }); }); Server Side THEAD Rendering [updated from comments 11/21/2010] Several commenters pointed out that you can also do this on the server side by using the GridView.HeaderRow.TableSection property to force rendering with a proper table header. I was unaware of this option actually – not exactly an easy one to discover. One issue here is that timing of this needs to happen during the databinding process so you need to use an event handler: this.gvCustomers.DataBound += (object o, EventArgs ev) => { gvCustomers.HeaderRow.TableSection = TableRowSection.TableHeader; }; this.gvCustomers.DataSource = custList; this.gvCustomers.DataBind(); You can apply the same logic for the FooterRow. It’s beyond me why this rendering mode isn’t the default for a GridView – why would you ever want to have a table that doesn’t use a THEAD section??? But I disgress :-) I don’t use GridViews much anymore – opting for more flexible approaches using ListViews or even plain code based views or other custom displays that allow more control over layout, but I still see a lot of old code that does use them old clunkers including my own :) (gulp) and this does make life a little bit easier especially if you’re working with any of the jQuery table related plug-ins that expect a proper table structure.© Rick Strahl, West Wind Technologies, 2005-2010Posted in ASP.NET  jQuery  

    Read the article

  • Proper Use Of HTML Data Attributes

    - by VirtuosiMedia
    I'm writing several JavaScript plugins that are run automatically when the proper HTML markup is detected on the page. For example, when a tabs class is detected, the tabs plugin is loaded dynamically and it automatically applies the tab functionality. Any customization options for the JavaScript plugin are set via HTML5 data attributes, very similar to what Twitter's Bootstrap Framework does. The appeal to the above system is that, once you have it working, you don't have worry about manually instantiating plugins, you just write your HTML markup. This is especially nice if people who don't know JavaScript well (or at all) want to make use of your plugins, which is one of my goals. This setup has been working very well, but for some plugins, I'm finding that I need a more robust set of options. My choices seem to be having an element with many data-attributes or allowing for a single data-options attribute with a JSON options object as a value. Having a lot of attributes seems clunky and repetitive, but going the JSON route makes it slightly more complicated for novices and I'd like to avoid full-blown JavaScript in the attributes if I can. I'm not entirely sure which way is best. Is there a third option that I'm not considering? Are there any recommended best practices for this particular use case?

    Read the article

  • What's the proper way to merge two projects in source control software

    - by Mallow
    I'm using Fossil-SCM to maintain my projects. Since I don't work in a team I usually have just a very linear branch of development: 1.0 - 1.1 - 1.2 I'm wondering what the procedure is when you have one project who's task is about to be given to a related project. And thereby rendering the first project obsolete. Although I tend to rewrite most of my code if I don't remember having already written it, I still would like to keep the code archived. And I'ld rather not have a fossil repo that just is dead. Can I merge it? Is that the proper way of handling this? For example the code was extracting data from an excel file in order to format an HTML page. Now, I've convinced my employer to move their excel spreadsheet into a database to decrease redundancy, increase efficiency and yaddy yadda. Since I can now make logical queries that don't have to jump hoops to preform using the database I won't need the extra vbs files that originally manipulated the excel file. Technically I would be porting part of the existing code into the current new project. Since it already has it's own trunk, would it be advisable to combine the trunk of a different project to this one, and how would I do that exactly?? SO I guess my tree would look like this, and I haven't seen examples of software branching that resemble this inverted tree before so I'm wondering what the norm for a situation like this?

    Read the article

  • Proper XAML for Windows 8 Applications [closed]

    - by Jaapjan
    Traditionally, my programs do their work in the background and when I do have to make an interface for some reason, they often do not need to be complex which means I can use a simple Windows Forms or console application. But lets be honest-- Windows Forms? That is so ... ancient! Instead I have been looking at Windows 8. A new interface, different, maybe better-- but fun to give a try. Which means XAML. Now, XAML isn't all that hard in concept. Panel here, button there-- A smattering of XML. My question in short: Where can I find resources that teach me how to write good XAML code for Windows 8 applications? The long version: How do I combine XAML constructs to achieve effects? Horizontal panels with multiple sections you can scroll through with your finger, the proper way? How should you use default style resources Windows 8 might give you by default? How do I properly create a panel with user info on the right? Left aligned stackpanels with embedded dockpanels? Yes? No? Why?

    Read the article

  • Boot error aftter clean Ubuntu 13.04 install: [Reboot and select proper boot device]

    - by IcarusNM
    I am having the same problem as this guy where a fresh Ubuntu install completes beautifully but will not boot. I get the ASUS (?) "Reboot and select proper boot device" error, first with Xubuntu 13.10 and after finally giving up there, and Xubuntu 13.4, I am back to regular Ubuntu 13.4. ASUS motherboard Z77, Intel chipset. Standard internal SATA 500GB HD. 64-bit. All-new hardware less than 3 months old. It was running Ubuntu 12.04LTC great until I tried this upgrade. I have re-installed from scratch every which way: with LVM, without LVM; with the default partitions, with my own partitions. With ext3 or ext4. Alongside; replace; upgrade. No difference. On the last two tries, I have booted afterward from the same USB stick, downloaded and run boot-repair, and now I guess I am off to the boot-repair support email with my URLs from that. It did all kinds of cool stuff but ultimately made no difference. I never got anything like this with Ubuntu 12.04. I've now probably re-installed Ubuntu 13.04 ten times slightly different ways. I finally found how to skip the language packs, so at least that sped things up! :) This starts from the ubuntu-13.04-desktop-amd64.iso and UNetbootin as suggested on the official instructions for USB thumb drive creation from OSX. That part all works fine (booting the USB on the PC and trying Ubuntu and/or installing from there on the PC HD.) I have no CD drive on this PC, but I suppose I could get one. I would rather find some Linux install that works from USB like I've always done. After running boot-repair twice, in the ASUS BIOS I now see three different UEFI boot options in the priority list, and they are all labeled exactly the same: ubuntu (P6: WDC WD5000AAKX-00U6AA0) Then there's a non-UEFI option: P6: WDC WD5000AAKX-00U6AA0 (476940MB) And a fifth option appeared after the first boot-repair: Windows Boot Manager (P6: WDC WD5000AAKX-00U6AA0) I have tried all 5 of these, and I get exactly the same error. I have never had Windows installed on this HD. ASUS is calling it Windows Boot Manaer but I presume that's a mistaken label for whatever boot-repair did. I can boot on USB and run GParted and it looks great. The partitions all look normal. I found another case of this online with no solution posted. I can't find much about it online. Needs a Master Boot Record wipe/redo?? I'm not sure how.

    Read the article

  • The Proper Use of the VM Role in Windows Azure

    - by BuckWoody
    At the Professional Developer’s Conference (PDC) in 2010 we announced an addition to the Computational Roles in Windows Azure, called the VM Role. This new feature allows a great deal of control over the applications you write, but some have confused it with our full infrastructure offering in Windows Hyper-V. There is a proper architecture pattern for both of them. Virtualization Virtualization is the process of taking all of the hardware of a physical computer and replicating it in software alone. This means that a single computer can “host” or run several “virtual” computers. These virtual computers can run anywhere - including at a vendor’s location. Some companies refer to this as Cloud Computing since the hardware is operated and maintained elsewhere. IaaS The more detailed definition of this type of computing is called Infrastructure as a Service (Iaas) since it removes the need for you to maintain hardware at your organization. The operating system, drivers, and all the other software required to run an application are still under your control and your responsibility to license, patch, and scale. Microsoft has an offering in this space called Hyper-V, that runs on the Windows operating system. Combined with a hardware hosting vendor and the System Center software to create and deploy Virtual Machines (a process referred to as provisioning), you can create a Cloud environment with full control over all aspects of the machine, including multiple operating systems if you like. Hosting machines and provisioning them at your own buildings is sometimes called a Private Cloud, and hosting them somewhere else is often called a Public Cloud. State-ful and Stateless Programming This paradigm does not create a new, scalable way of computing. It simply moves the hardware away. The reason is that when you limit the Cloud efforts to a Virtual Machine, you are in effect limiting the computing resources to what that single system can provide. This is because much of the software developed in this environment maintains “state” - and that requires a little explanation. “State-ful programming” means that all parts of the computing environment stay connected to each other throughout a compute cycle. The system expects the memory, CPU, storage and network to remain in the same state from the beginning of the process to the end. You can think of this as a telephone conversation - you expect that the other person picks up the phone, listens to you, and talks back all in a single unit of time. In “Stateless” computing the system is designed to allow the different parts of the code to run independently of each other. You can think of this like an e-mail exchange. You compose an e-mail from your system (it has the state when you’re doing that) and then you walk away for a bit to make some coffee. A few minutes later you click the “send” button (the network has the state) and you go to a meeting. The server receives the message and stores it on a mail program’s database (the mail server has the state now) and continues working on other mail. Finally, the other party logs on to their mail client and reads the mail (the other user has the state) and responds to it and so on. These events might be separated by milliseconds or even days, but the system continues to operate. The entire process doesn’t maintain the state, each component does. This is the exact concept behind coding for Windows Azure. The stateless programming model allows amazing rates of scale, since the message (think of the e-mail) can be broken apart by multiple programs and worked on in parallel (like when the e-mail goes to hundreds of users), and only the order of re-assembling the work is important to consider. For the exact same reason, if the system makes copies of those running programs as Windows Azure does, you have built-in redundancy and recovery. It’s just built into the design. The Difference Between Infrastructure Designs and Platform Designs When you simply take a physical server running software and virtualize it either privately or publicly, you haven’t done anything to allow the code to scale or have recovery. That all has to be handled by adding more code and more Virtual Machines that have a slight lag in maintaining the running state of the system. Add more machines and you get more lag, so the scale is limited. This is the primary limitation with IaaS. It’s also not as easy to deploy these VM’s, and more importantly, you’re often charged on a longer basis to remove them. your agility in IaaS is more limited. Windows Azure is a Platform - meaning that you get objects you can code against. The code you write runs on multiple nodes with multiple copies, and it all works because of the magic of Stateless programming. you don’t worry, or even care, about what is running underneath. It could be Windows (and it is in fact a type of Windows Server), Linux, or anything else - but that' isn’t what you want to manage, monitor, maintain or license. You don’t want to deploy an operating system - you want to deploy an application. You want your code to run, and you don’t care how it does that. Another benefit to PaaS is that you can ask for hundreds or thousands of new nodes of computing power - there’s no provisioning, it just happens. And you can stop using them quicker - and the base code for your application does not have to change to make this happen. Windows Azure Roles and Their Use If you need your code to have a user interface, in Visual Studio you add a Web Role to your project, and if the code needs to do work that doesn’t involve a user interface you can add a Worker Role. They are just containers that act a certain way. I’ll provide more detail on those later. Note: That’s a general description, so it’s not entirely accurate, but it’s accurate enough for this discussion. So now we’re back to that VM Role. Because of the name, some have mistakenly thought that you can take a Virtual Machine running, say Linux, and deploy it to Windows Azure using this Role. But you can’t. That’s not what it is designed for at all. If you do need that kind of deployment, you should look into Hyper-V and System Center to create the Private or Public Infrastructure as a Service. What the VM Role is actually designed to do is to allow you to have a great deal of control over the system where your code will run. Let’s take an example. You’ve heard about Windows Azure, and Platform programming. You’re convinced it’s the right way to code. But you have a lot of things you’ve written in another way at your company. Re-writing all of your code to take advantage of Windows Azure will take a long time. Or perhaps you have a certain version of Apache Web Server that you need for your code to work. In both cases, you think you can (or already have) code the the software to be “Stateless”, you just need more control over the place where the code runs. That’s the place where a VM Role makes sense. Recap Virtualizing servers alone has limitations of scale, availability and recovery. Microsoft’s offering in this area is Hyper-V and System Center, not the VM Role. The VM Role is still used for running Stateless code, just like the Web and Worker Roles, with the exception that it allows you more control over the environment of where that code runs.

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >