Search Results

Search found 31207 results on 1249 pages for 'atg best practice in industries'.

Page 95/1249 | < Previous Page | 91 92 93 94 95 96 97 98 99 100 101 102  | Next Page >

  • REST: Should I redirect to the version URL of an entity?

    - by sfussenegger
    I am currently working on a REST service. This service has an entity which has different versions, similar to Wikipedia articles. Now I'm wondering what I should return if for GET /article/4711 Should I use a (temporary) redirect to the current version, e.g. GET /article/4711/version/7 Or should I return the current version directly? Using redirects would considerably simplify HTTP caching (using Last-Modified) but has the disadvantages a redirect has (extra request, 'harder' to implement). Therefore I'm not sure whether this is good practice though. Any suggestions, advise, or experiences to share? (btw: ever tried search for "REST Version"? Everything you get is about the version of the API rather than entities. So please bear with me if this is a duplicate.)

    Read the article

  • Double associative array or indexed + associative array

    - by clover
    I'm undecided what's the best-practice approach for what I'm trying to do. I'm trying to enter data into an array where the data will look like this: apple color: red price: 2 orange color: orange price: 3 banana color: yellow price: 2 pineapple color: yellow price: 5 When I get input, let's say green apple (notice it's a combo of color + name of fruit), I'm going to check if the name of fruit part exists in the array and display its data (if it exists). What's the right way to compose those arrays? How would I do an indexed array containing an associative array? (or would this be better as 2 nested associative arrays, I'm guessing not)

    Read the article

  • Assembly wide multicast attributes. Are they evil?

    - by HeavyWave
    I am working on a project where we have several attributes in AssemblyInfo.cs, that are being multicast to a methods of a particular class. [assembly: Repeatable( AspectPriority = 2, AttributeTargetAssemblies = "MyNamespace", AttributeTargetTypes = "MyNamespace.MyClass", AttributeTargetMemberAttributes = MulticastAttributes.Public, AttributeTargetMembers = "*Impl", Prefix = "Cls")] What I don't like about this, is that it puts a piece of login into AssemblyInfo (Info, mind you!), which for starters should not contain any logic at all. The worst part of it, is that the actual MyClass.cs does not have the attribute anywhere in the file, and it is completely unclear that methods of this class might have them. From my perspective it greatly hurts readability of the code (not to mention that overuse of PostSharp can make debugging a nightmare). Especially when you have multiple multicast attributes. What is the best practice here? Is anyone out there is using PostSharp attributes like this?

    Read the article

  • Popup Dialog Box Manager using PureMVC

    - by webwise
    I am developing a a game in Flash using the PureMVC framework. From time to time I need to show dialog pop-up window to get a user response back (e.g. "Cancel", "OK" and other kinds of asynchronous user feedback) while "locking" the background for interactivity. I need some management for my pop-ups: all pop-up notifications should be stacked up, so that if two (or more) pop-up messages are initiated at the same time I show them one by one. What's the best practice here? Should I employ a proxy to manage my pop-ups (sounds unreasonable). How do I get feedback back from my dialog? using notifications?

    Read the article

  • Specification: Use cases for CRUD

    - by Mario Ortegón
    I am writing a Product requirements specification. In this document I must describe the ways that the user can interact with the system in a very high level. Several of these operations are "Create-Read-Update-Delete" on some objects. The question is, when writing use cases for these operations, what is the right way to do so? Can I write only one Use Case called "Manage Object x" and then have these operations as included Use Cases? Or do I have to create one use case per operation, per object? The problem I see with the last approach is that I would be writing quite a few pages that I feel do not really contribute to the understanding of the problem. What is the best practice?

    Read the article

  • Is it OK to reference 'this' when initializing a field?

    - by parxier
    Is it OK to reference this when initializing a field? public class MainClass { private SomeFieldClass field = new SomeFieldClass(this); public MainClass() {} } Or is it better to do that in constructor? public class MainClass { private SomeFieldClass field; public MainClass() { this.field = new SomeFieldClass(this); } } What is the best practice? I believe first option is better for unit testing and dependency injection. Are there any problems with it?

    Read the article

  • Should image size be defined in the img tag height/width attributes or in CSS?

    - by Benjamin Manns
    Is it better coding practice to define an images size in the img tag's width and height attributes? <img src="images/academia_vs_business.png" width="740" height="382" alt="" /> Or in the CSS style with width/height? <img src="images/academia_vs_business.png" style="width:740px; height:382px;" alt="" /> Or both? <img src="images/academia_vs_business.png" width="740" height="382" style="width:740px; height:382px" alt="" />

    Read the article

  • How to apply coding methodologies and practices to non-coding work?

    - by Dan
    I can talk for hours about best-practice, source control, change management, feature tracking, development cycles and the lot, but most of what I've learnt or read seems to apply to nuts-and-bolts programming of compiled applications. You know, ASCII files that gets turned into 1s and 0s. How does one apply the same discipline and wisdom to working in environments that are point-and-click, config-centric. I'm thinking of CMSs and specifically, my current 9 to 5, SharePoint. Traditional practices of source control, dev-staging-production seem to break down since we're not working with code, and the live environment changes with user input. So to sum up a rather lengthy question, what works in a no-code environment?

    Read the article

  • What should I name my files with generic class definitions?

    - by Tomas Lycken
    I'm writing a couple of classes that all have generic type arguments, but I need to overload the classes because I need a different number of arguments in different scenarios. Basically, I have public class MyGenericClass<T> { ... } public class MyGenericClass<T, K> { ... } public class MyGenericClass<T, K, L> { ... } // it could go on forever, but it won't... I want them all in the same namespace, but in one source file per class. What should I name the files? Is there a best practice?

    Read the article

  • Do the UI first with SketchFlow - Do I concern about the UI look?

    - by stacker
    There is no questions: UI-First Software Development. But what does it takes to do the UI first? I started to build a website, a complicated one, and know I start to concern about the UI. Instead to start coding html+css, I decided to start with SkecthFlow. now, I'm very confused. Do I want to build a exact sketch? meaning to think about colors, fonts make sure that the button will look like a web link... etc, or just build the application sketch flow? meaning put a textboxes and buttons. Do I need to implement every thing in SketchFlow first? I'm looking for best practice.

    Read the article

  • Defining - and dealing with - Evil

    - by Chris Becke
    As a software developer one sometimes gets feature requests that seem to be in some kind of morally grey area. Sometimes one can deflect them, or implement them in a way that feels less 'evil' - sometimes - on reflection - while the feature request 'feels' wrong theres no identifiable part of it that actually causes harm. Sometimes one feels a feature is totally innocent but various anti virus products start tagging one as malware. For example - I personally consider EULAs to (a) hopefully be unenforceable and (b) a means by which rights are REMOVED from consumers. However Anti Virus scanners frequently mark as malware any kind of download agent that does not display a EULA. Which to me is the result of a curious kind of double think. What I want to know is - are there any online (or offline) resources that cover evil software development practices? How can I know if a software practice that I consider dodgy is in fact evil enough to consider fighting?

    Read the article

  • What should the Java main method be for a standalone application (for Spring JMS) ?

    - by Brandon
    I am interested in creating a Spring standalone application that will run and wait to receive messages from an ActiveMQ queue using Spring JMS. I have searched a lot of places and cannot find a consistent way of implementing the main method for such a standalone application. There appears to be few examples of Spring standalone applications. I have looked at Tomcat, JBoss, ActiveMQ and other examples from the around the web but I have not come to a conclusion so ... What is the best practice for implementing a main method for a Java application (specifically Spring with JMS) ?

    Read the article

  • Passing arguments and values form HTML to jQuery (events)

    - by Jaroslav Moravec
    What is the practice to pass arguments from HTML to jQuery events function. For example getting id of row from db: <tr class="jq_killMe" id="thisItemId-id"> ... </tr> and jQuery: $(".jq_killMe").click(function () { var tmp = $(this).attr('id).split("-"); var id = tmp[0] // ... } What's the best practise, if I want to pass more than one argument? Is it better not to use jQuery? For example: <tr onclick="killMe('id')"> ... </tr> I didn't find the answer on my question, I will be glad even for links. Thanks.

    Read the article

  • How to release a simple program

    - by Zenya
    What is the best practice for releasing a simple software? Suppose I created a very small simple and useful program or a tool and would like to share it with everyone by uploading it to my web-site. Do I need a license and which one? (I read http://www.gnu.org/ and http://www.fsf.org/ but still cannot decide - there are too many of them.) Do I need to put somewhere a copyright and what is the basic principles of creating "Copyright" string? How can I make a user, who is going to download and install my program, to believe that my program doesn't contain viruses or a malicious code?

    Read the article

  • Is there a difference between Perl's shift versus assignment from @_ for subroutine parameters?

    - by cowgod
    Let us ignore for a moment Damian Conway's best practice of no more than three positional parameters for any given subroutine. Is there any difference between the two examples below in regards to performance or functionality? Using shift: sub do_something_fantastical { my $foo = shift; my $bar = shift; my $baz = shift; my $qux = shift; my $quux = shift; my $corge = shift; } Using @_: sub do_something_fantastical { my ($foo, $bar, $baz, $qux, $quux, $corge) = @_; } Provided that both examples are the same in terms of performance and functionality, what do people think about one format over the other? Obviously the example using @_ is fewer lines of code, but isn't it more legible to use shift as shown in the other example? Opinions with good reasoning are welcome.

    Read the article

  • Is wrapping new within the constructor good or bad?

    - by Timothy
    I watched John Resig's Best Practices in JavaScript Library Design presentation; one slide suggested "tweaking" the object constructor so it instantiates itself. function jQuery(str, con) { if (window === this) { return new jQuery(str, con); } // ... } With that, new jQuery("#foo") becomes jQuery("# foo"). I thought it was rather interesting, but I haven't written a constructor like that in my own code. A little later I read a post here on SO. (Sorry, I don't remember which or I'd supply a link. I will update the question if I can find it again.) One of the comments said it was bad practice to hide new from the programmer like that, but didn't go into details. My question is, it the above generally considered good, bad, or indifferent, and why?

    Read the article

  • Is this a "valid" css image replacement technique?

    - by user278457
    I just came up with this, it seems to work in all modern browsers, I just tested it then on (IE8/compatibility, Chrome, Safari, Moz) HTML <img id="my_image" alt="my text" src="images/small_transparent.gif" /> CSS #my_image{ background-image:url('images/my_image.png'); width:100px; height:100px;} Pro's: image alt text is best-practice for accessibility/seo no extra HTML markup, and the css is pretty minimal too gets around the css on/images off issue where "text-indent" techniques hide text from low bandwidth users The biggest disadvantage that I can think of is the css off/images on situation, because you'll only send a transparent gif. I'd like to know, who uses images without stylesheets? some kind of mobile phone or something? I'm making some sites for clients in regional Australia (hundreds of km from the nearest city), where many users will be suffering from dial-up connections, and often outdated browsers too, so the "images off" issue is an important consideration. are there any other side effects with this technique that I haven't considered?

    Read the article

  • Suggestions: Anti-Pattern counter-examples

    - by Tom W
    It doesn't seem that this exact question has been asked before, so I'll fire away: Most of us are familiar with the concept of an anti-pattern. However, avoiding implementation of anti-patterns can in principle swing too far the other way and cause problems itself. As an example, "Design by Committee" has a counter-example that I'd call "Design by Maverick" - wherein the design of an important feature is handed off to an individual to do what they think best, with the intention of reviewing their work later and deciding whether it should be finalised or go through another iteration. This takes much longer in practice as the rest of the team are occupied by other things, and can end up with a feature that's useful to nobody, particularly if the Maverick is not themselves an experienced end-user. Does anyone have any more examples of anti-pattern counter-examples?

    Read the article

  • Resetting Objects vs. Constructing New Objects

    - by byronh
    Is it considered better practice and/or more efficient to create a 'reset' function for a particular object that clears/defaults all the necessary member variables to allow for further operations, or to simply construct a new object from outside? I've seen both methods employed a lot, but I can't decide which one is better. Of course, for classes that represent database connections, you'd have to use a reset method rather than constructing a new one resulting in needless connecting/disconnecting, but I'm talking more in terms of abstraction classes. Can anyone give me some real-world examples of when to use each method? In my particular case I'm thinking mostly in terms of ORM or the Model in MVC. For example, if I would want to retrieve a bunch of database objects for display and modify them in one operation.

    Read the article

  • How to code for Alternate Course AKA Rainy Day Scenary?

    - by janetsmith
    Alternate course is something when user doesn't do what you expected, e.g. key in wrong password, pressing back button, or database error. For any programming project, alternate course accounts for more than 50% of a project timeline. It is important. However, most computer books only focus on Basic Course (when everything goes fine). Basic course is rather simple, compared to Alternate course, because this is normally given by client. Alternate course is what we, as a programmer or Business Analyst needs to take care of. Java has some built-in mechanism (try-catch) to force us to handle those unexpected behavior. The question is, how to handle them? Any pattern to follow? Any guideline or industry practice for handling alternate course?

    Read the article

  • Should my internal API classes be all in one package?

    - by Chris
    I'm hard at work packaging up an API for public consumption. As such I'm trying to limit the methods that are exposed to only those that I wish to be public and supportable. Underneath this of course there are a multitude of limited access methods. The trouble is that I have a lot of internal code that needs to access these restricted methods without making those methods public. This creates two issues: I can't create interfaces to communicate between classes as this would make these my internal methods public. I can't access protected or default methods unless I put the majority of my internal classes in the same package. So, I have around 70 or 80 internal classes in cleanly segregated packages BUT with overly permissive access modifiers. Would you say that a single package is the lesser of two evils or is there a better way to be able to mask my internal methods whilst keeping more granular packages? I'd be interested to find out the best practice here. I'm already aware of This

    Read the article

  • Style of if: to nest or not to nest

    - by Marco
    A colleague of mine and me had a discussion about the following best-practice issue. Most functions/methods start with some parameter checking. I advocate the following style, which avoids nesting. if (parameter one is ugly) return ERROR; if (parameter two is nonsense || it is raining) return ERROR; // do the useful stuff return result; He, who comes from a more functional/logic programming background, prefers the following, because it reduces the number of exit points from the function. if (parameter one is ok) { if (parameter two is ok && the sun is shining) { // do the useful stuff return result } } return ERROR; Which one would you prefer and why?

    Read the article

  • Writing a custom iterator -- what to do if you're at the end of the array?

    - by Goose Bumper
    I'm writing a custom iterator for a Matrix class, and I want to implement the increment method, which gets called when the iterator is incremented: void MatrixIterator::increment() { // go to the next element } Suppose the iterator has been incremented too many times and now points to past the end of the matrix (i.e. past the one-past-the-end point). What is the best practice for this situation? Should I catch this with an assert, or should I just say it's the user's responsibility to keep track of where the iterator is pointing and it's none of my business?

    Read the article

  • Should Factories Persist Entities?

    - by mxmissile
    Should factories persist entities they build? Or is that the job of the caller? Pseudo Example Incoming: public class OrderFactory { public Order Build() { var order = new Order(); .... return order; } } public class OrderController : Controller { public OrderController(IRepository repository) { this.repository = repository; } public ActionResult MyAction() { var order = factory.Build(); repository.Insert(order); ... } } or public class OrderFactory { public OrderFactory(IRepository repository) { this.repository = repository; } public Order Build() { var order = new Order(); ... repository.Insert(order); return order; } } public class OrderController : Controller { public ActionResult MyAction() { var order = factory.Build(); ... } } Is there a recommended practice here?

    Read the article

  • Is there a more correct type for passing in the file path and file name to a method

    - by Rihan Meij
    Hi What I mean by this question is, when you need to store or pass a URL around, using a string is probably a bad practice, and a better approach would be to use a URI type. However it is so easy to make complex things more complex and bloated. So if I am going to be writing to a file on disk, do I pass it a string, as the file name and file path, or is there a better type that will be better suited to the requirement? This code seems to be clunky, and error prone? I would also need to do a whole bit of checking if it is a valid file name, if the string contains data and the list goes on. private void SaveFile(string fileNameAndPath) { //The normal stuff to save the file }

    Read the article

< Previous Page | 91 92 93 94 95 96 97 98 99 100 101 102  | Next Page >