Search Results

Search found 4835 results on 194 pages for 'practice'.

Page 46/194 | < Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >

  • Returning back to the results after editing

    - by Parhs
    Hello, I am developing an application which has several CRUD actions... I am using Java and i am forced to use Struts framework. My problem is: I have a search page which returns some results.The user can click at a result and then he goes to another edit-page... He may apply changes or not...What i need is a way to return at the result page again and at the same scroll position.Javascript must be enabled for this project however.. I am wondering which is the best practice to achieve this effect... A solution would be to save the last search URL but i know that this wouldnt work if the user has multiple results. I know how to do it but i am lloking for a good practice!

    Read the article

  • Using TDD: "top down" vs. "bottom up"

    - by Christian Mustica
    Since I'm a TDD newbie, I'm currently developing a tiny C# console application in order to practice (because practice makes perfect, right?). I started by making a simple sketchup of how the application could be organized (class-wise) and started developing all domain classes that I could identify, one by one (test first, of course). In the end, the classes have to be integrated together in order to make the application runnable, i.e. placing necessary code in the Main method which calls the necessary logic. However, I don't see how I can do this last integration step in a "test first" manner. I suppose I wouldn't be having these issues had I used a "top down" approach. The question is: how would I do that? Should I have started by testing the Main() method? If anyone could give me some pointers, it will be much appreciated.

    Read the article

  • Leaving SQL Management open on the internet

    - by Tim Fraud
    I am a developer, but every so often need access to our production database -- yeah, poor practice, but anyway... My boss doesn't want me directly on the box using RDP, and so we decided to just permit MS SQL Management Console access so that I can do my tasks. So right now we have the SQL box somewhat accessible on the internet (on port 1433 if I am not mistaken), which opens a security hole. But I am wondering, how much of an uncommon practice is this, and what defaults should I be concerned about? We use MSSQL2008 and I created an account that has Read-Only access, because my production tasks only need that. I didn't see any unusual default accounts with default passwords on the system, so I would be interested to hear your take. (And of-course, is there a better way?)

    Read the article

  • Is referencing a selector faster in jquery than actually calling the selector? if so, how much does it make a difference?

    - by anthonypliu
    Hi, I have this code: $(preview-button).click(...) $(preview-button).slide(...) $(preview-button).whatever(...) Is it a better practice to do this: var preview-button = $(preview-button); preview-button.click(...); preview-button.click(...); preview-button).slide(...); preview-button.whatever(...); It probably would be better practice to do this for the sake of keeping code clean and modular, BUT does it make a difference performance wise? Does one take longer to process than the other? Thanks guys.

    Read the article

  • Class.Class vs Namespace.Class for top level general use class libraries?

    - by Joan Venge
    Which one is more acceptable (best-practice)?: namespace NP public static class IO public static class Xml ... // extension methods using NP; IO.GetAvailableResources (); vs public static class NP public static class IO public static class Xml ... // extension methods NP.IO.GetAvailableResources (); Also for #2, the code size is managed by having partial classes so each nested class can be in a separate file, same for extension methods (except that there is no nested class for them) I prefer #2, for a couple of reasons like being able to use type names that are already commonly used, like IO, that I don't want to replace or collide. Which one do you prefer? Any pros and cons for each? What's the best practice for this case? EDIT: Also would there be a performance difference between the two?

    Read the article

  • Prevent blank links (having javascript:;) from openening in new tab/window on middle click...?

    - by jayarjo
    There is a common practice of using <a></a> tags to markup beautiful buttons, with onlick and onhover style change, etc. Which looks and behaves great, on most part. Although there turned out to be a HUGE problem, which was not very obvious on start. The problem is that these beautiful "buttons" open new windows on middle click, either blank or with the same content as current one (depends on whether one uses # or javascript:; to disable href part). Now I've got JavaScript RIA with buttons all over it, opening new windows on middle click... Lame... At first I even couldn't understand why I get sometimes those blank pages in the browser. Since it's pretty established practice to use links in such manner, maybe there is any established way to deal with described problem?

    Read the article

  • Render Order via HTML or CSS

    - by Bullines
    What is the best practice is in the case of altering the render order of elements on a webpage. For example, I have two DIVs that are to be displayed on a page: <div id="appleSection"> <!-- Apple DIVs, content, form elements, etc --> </div> <div id="orangeSection"> <!-- Orange DIVs, content, form elements, etc --> </div> Depending on user selection (perhaps by country or something), the order which the DIVs are presented to the user can differ. Certain conditions present appleSection above orangeSection, and for other conditions, their order is reversed. If the core logic of the page is the same regardless, is it a best practice to determine order on the server-side (perhaps via two pages that differ in the order of the DIVs), or is it more appropriate to have just a single page and use CSS to control whether appleSection is above orangeSection or vice versa?

    Read the article

  • c++ - FIFO implementation

    - by Narek
    While implementing a FIFO I have used the following structure: struct Node { T info_; Node* link_; Node(T info, Node* link=0): info_(info), link_(link) {} }; I think this a well known trick for lots of STL containers (for example for List). Is this a good practice? What it means for compiler when you say that Node has a member with a type of it's pointer? Is this a kind of infinite loop? And finally, if this is a bad practice, how I could implement a better FIFO.

    Read the article

  • Where should I set the DataContext - code behind or xaml?

    - by dovholuk
    (honestly I searched and read all the 'related questions' that seemed relevant - i do hope i didn't "miss" this question from elsewhere but here goes...) There are two different ways (at least) to set the DataContext. One can use XAML or one can use the code behind. What is the 'best practice' and why? I tend to favor setting it in XAML because it allows a designer to define collections on their own but I need 'ammunition' on why it's a best practice or why I'm crazy and the code behind is the bomb...

    Read the article

  • Should I put a try-finally block after every Object.Create?

    - by max
    I have a general question about best practice in OO Delphi. Currently, I put try-finally blocks anywhere I create an object to free that object after usage (to avoid memory leaks). E.g.: aObject := TObject.Create; try aOBject.AProcedure(); ... finally aObject.Free; end; instead of: aObject := TObject.Create; aObject.AProcedure(); .. aObject.Free; Do you think it is good practice, or too much overhead? And what about the performance?

    Read the article

  • [ADVICE] .NET Desktop Application - Client Server C#, SQL

    - by Rillanon
    Hi guys, Recently I've being given a chance to develop a PMS (Practice Management System) software for a small physiotherapy clinic. I'm a computer science student and my course is predominately told on Linux. However, my client runs all their computers on vista or Windows 7. My ideas are to develop the client front end in Visual C# and access a central postgresql server. I'm a beginner in Windows Programming so I'm after advice on best practice on implement user rights and access levels in C# (WPF or Windows FORM). I've had a look into Credential class in Visual C# and access control list but please share your thoughts. I'm probably way over my head on this but this is my first commercial project so I'm keen to test the waters. Cheers Ian

    Read the article

  • Layout with divs... can you have too many?

    - by user1066982
    What is the best practice for developing a layout? Is better to limit divs? I was looking through the html/css of some popular sites and they all seem to have divs within divs. For instance, a div for the entire page, a div for the topbar, a div within the top bar for the logo, search bar, etc. Is this a good practice? I suppose it's easier to position all the divs correctly and than place the necessary elements within the divs. It's what I've been doing this far but want to make sure I'm learning the correct approach. Any help on this is appreciated. Thanks!

    Read the article

  • How to deal with multiple screensizes + dynamic controls in Android?

    - by chobo2
    Hi I am learning how to program on Android phone. However I am unsure how to make my application work for the different screen sizes and resolutions. I read the tutorial on the android site and still unsure how to do it. First I know there are different files so could make a layout for each of the sizes but my problem is most of the screen needs to be dynamically created so there would not be much to put in these files. So I am not sure how to android to re size dynamic controls based on the screen size. I have also read it is bad practice to make controls in anything but the xml file as it separates view logic and programming logic. However they never talk about if you need to make these controls dynamically what you should do. So is there some other way to do it that is considered good practice?

    Read the article

  • try finally block around every Object.Create?

    - by max
    Hi, I have a general question about best practice in OO Delphi. Currently, I but a try finally block around everywhere, where I create an object, to free that object after usage (to avoid memory leaks). E.g.: aObject := TObject.Create; try aOBject.AProcedure(); ... finally aObject.Free; end; instead of: aObject := TObject.Create; aObject.AProcedure(); .. aObject.Free; To you think, it is good practice, or too much overhead? And what about the performance?

    Read the article

  • Tellago is still hiring….

    - by gsusx
    Tellago 's SOA practice is rapidly growing and we are still hiring. In that sense, we are looking to for Connected Systems (WCF, BizTalk, WF) experts who are passionate about building game changing solutions with the latest Microsoft technologies. You will be working alongside technology gurus like DonXml , Pablo Cibraro or Dwight Goins . If you are interested and not afraid of working with a bunch of crazy people ;)please drop me a line at jesus dot rodriguez at tellago dot com. Hope to hear from...(read more)

    Read the article

  • Constructor parameter validation in C# - Best practices

    - by MPelletier
    What is the best practice for constructor parameter validation? Suppose a simple bit of C#: public class MyClass { public MyClass(string text) { if (String.IsNullOrEmpty(text)) throw new ArgumentException("Text cannot be empty"); // continue with normal construction } } Would it be acceptable to throw an exception? The alternative I encountered was pre-validation, before instantiating: public class CallingClass { public MyClass MakeMyClass(string text) { if (String.IsNullOrEmpty(text)) { MessageBox.Show("Text cannot be empty"); return null; } else { return new MyClass(text); } } }

    Read the article

  • using ‘using’ and scope. Not try finally!

    - by Edward Boyle
    An object that implements IDisposable has, you guessed it, a Dispose() method. In the code you write you should both declare and instantiate any object that implements IDisposable with the using statement. The using statement allows you to set the scope of an object and when your code exits that scope, the object will be disposed of. Note that when an exception occurs, this will pull your code out of scope, so it still forces a Dispose() using (mObject o = new mObject()) { // do stuff } //<- out of Scope, object is disposed. // Note that you can also use multiple objects using // the using statement if of the same type: using (mObject o = new mObject(), o2 = new mObject(), o3 = new mObject()) { // do stuff } //<- out of Scope, objects are disposed. What about try{ }finally{}? It is not needed when you use the using statement. Additionally, using is preferred, Microsoft’s own documents put it this way: As a rule, when you use an IDisposable object, you should declare and instantiate it in a using statement. When I started out in .NET I had a very bad habit of not using the using statement. As a result I ran into what many developers do: #region BAD CODE - DO NOT DO try { mObject o = new mObject(); //do stuff } finally { o.Dispose(); // error - o is out of scope, no such object. } // and here is what I find on blogs all over the place as a solution // pox upon them for creating bad habits. mObject o = new mObject(); try { //do stuff } finally { o.Dispose(); } #endregion So when should I use the using statement? Very simple rule, if an object implements IDisposable, use it. This of course does not apply if the object is going to be used as a global object outside of a method. If that is the case, don’t forget to dispose of the object in code somewhere. It should be made clear that using the try{}finally{} code block is not going to break your code, nor cause memory leaks. It is perfectly acceptable coding practice, just not best coding practice in C#. This is how VB.NET developers must code, as there is no using equivalent for them to use.

    Read the article

  • Software Testing Humor

    - by mbcrump
    I usually don’t share these kind of things unless it really makes me laugh. At least, I can provide a link to a free eBook on the Pablo’s S.O.L.I.D principles eBook. S.O.L.I.D. is a collection of best-practice object-oriented design principles that you can apply to your design to accomplish various desirable goals like loose-coupling, higher maintainability, intuitive location of interesting code, etc You may also want to check out the Pablo’s 31 Days of Refactoring eBook as well.

    Read the article

< Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >