Search Results

Search found 13259 results on 531 pages for 'design'.

Page 170/531 | < Previous Page | 166 167 168 169 170 171 172 173 174 175 176 177  | Next Page >

  • I have to generate PL/SQL using Java. Most of the procedures are common. Only a few keeps changing.

    - by blog
    I have to generate PL-SQL code, with some common code(invariable) and a variable code. I don't want to use any external tools. Some ways that I can think: Can I go and maintain the common code in a template and with markers, where my java code will generate code in the markers and generate a new file. Maintain the common code in static constant String and then generate the whole code in StringBuffer and at last write to file. But, I am not at all satisfied with both the ideas. Can you please suggest any better ways of doing this or the use of any design patterns or anything? Thanks in Advance.

    Read the article

  • Is foreign key reference from two different primary key from two different tables valid?

    - by arundex
    I have a foreign key that has to refer primary keys of two different tables. Table 1: animal animal_ id (primary key) Table 2: bird bird_ id (primary key) Table 3: Pet_info pet_id, type ENUM ('bird', 'animal') foreign key (pet_ id) references animal(animal_id), bird(bird_id) So, I need to check for pet_id either from animal or bird table depending on the need. Is this valid? Or should I go for some restructuring . . . NOTE: I referred this . . but I'm not sure whether I have to change my existing design

    Read the article

  • the News Feed technique

    - by Rawhi
    I have been read a lot of articles to make a good design for my database so I can get the most recent updates for every single user by executing a - kind of - complex query then I send the data using ajax as a JSON to JS file that makes an appropriate edits for the records. It seems fast but I don't know if it will be as much as fast if the site has a large number of users . so iv'e started looking for an alternatives . and I found something called NodeJS , I really didn't understand what it is stand for and hope that you can help me with that. from another hand if the facebook doesn't use a normal db to do whatever he does , then I think there is no way to do it . helpful link : What's the best manner of implementing a social activity stream? waiting for your comments. best regards

    Read the article

  • Class architecture, no friends allowed

    - by Captain Comic
    The question of why there are no friends in C# has been extensively discussed. I have the following design problems. I have a class that has only one public function AddOrder(Order ord). Clients are allowed to call only this function. All other logic must be hidden. Order class is listening to market events and must call other other function of TradingSystem ExecuteOrder, so I have to make it public as well. Doing that I will allow clients of Trading system to call this function and I don't want that. class TradingSystem { // Trading system stores list of orders List<Order> _orders; // this function is made public so that Order can call ir public ExecuteOrder(Order ord) { } // this function is made public for external clients public AddOrder(OrderRequest ordreq) { // create order and pass it this order.OnOrderAdded(this); } } class Order { TradingSystem _ts; public void OnOrderAdded(TradingSystem ts) { _ts = ts; } void OnMarketEvent() { _ts.ExecuteOrder() } }

    Read the article

  • Refactoring thick client legacy application

    - by Paul
    I am working on a fat client legacy C++ application which has a lot of business logic mixed in with the presentation side of things. I want to clean things out and refactor the code out completely, so there is a clear seperation of concerns. I am looking at MVC or some other suitable design pattern in order to achieve this. I would like to get recommendations from people who have walked this road before - Do I use MVP or MVC (or another pattern)? What is/are the best practices for undertaking something like this (i.e. useful steps/checks) ?

    Read the article

  • Is there anything like Zope Page Templates for Ruby on Rails?

    - by dan
    I have a Ruby on Rails app that I built myself, but which needs a redesign by a professional designer. I know most designers just give you Photoshop mockups and slices, but I would like to hire someone to implement the design as well, which means rewriting the css style sheets and the erb and haml templates. The problem is that I want someone else to implement the redesign without exposing my business logic code to the redesign implementer. Also, I wish there was a way to allow a designer to implement a redesign on a Ruby on Rails site without having to know anything about Ruby on Rails. Are either of these scenarios possible using any combination of software tools? I guess I'm looking for something like Zope Page Templates, but for Ruby on Rails. http://quintagroup.com/cms/zpthttp://quintagroup.com/cms/zpt

    Read the article

  • benefit os having a factory for object creation?

    - by ajsie
    im trying to understand the factory design pattern. i dont understand why it's good to have a middleman between the client and the product (object that the client wants). example with no factory: $mac = new Mac(); example with a factory: $appleStore = new AppleStore(); $mac = $appleStore->getProduct('mac'); how does the factory pattern decouple the client from the product? could someone give an example of a future code change that will impact on example 1 negative, but positive in example 2 so i understand the importance of decoupling? thanks

    Read the article

  • Sequencing ajax requests

    - by Scott Evernden
    I find I sometimes need to iterate some collection and make an ajax call for each element. I want each call to return before moving to the next element so that I don't blast the server with requests - which often leads to other issues. And I don't want to set async to false and freeze the browser. Usually this involves setting up some kind of iterator context that i step thru upon each success callback. I think there must be a cleaner simpler way? Does anyone have a clever design pattern for how to neatly work thru a collection making ajax calls for each item?

    Read the article

  • Interpreters: Handling includes/imports

    - by sub
    I've built an interpreter in C++ and everything works fine so far, but now I'm getting stuck with the design of the import/include/however you want to call it function. I thought about the following: Handling includes in the tokenizing process: When there is an include found in the code, the tokenizing function is recursively called with the filename specified. The tokenized code of the included file is then added to the prior position of the include. Disadvantages: No conditional includes(!) Handling includes during the interpreting process: I don't know how. All I know is that PHP must do it this way as conditional includes are possible. Now my questions: What should I do about includes? How do modern interpreters (Python/Ruby) handle this? Do they allow conditional includes?

    Read the article

  • Separating data from the UI code with Linq to SQL entities

    - by Sir Psycho
    If it's important to keep data access 'away' from business and presentation layers, what alternatives or approaches can I take so that my LINQ to SQL entities can stay in the data access layer? So far I seem to be simply duplicating the classes produced by sqlmetal, and passing those object around instead simply to keep the two layers appart. For example, I have a table in my DB called Books. If a user is creating a new book via the UI, the Book class generated by sqlmetal seems like a perfect fit although I'm tightly coupling my design by doing so.

    Read the article

  • "Send it to a friend" button on a webpage

    - by kender
    Hey, How often do we see stuff like "Send this page to a friend" on a webpages? Well, I see them quite often. My question is, how do you guys see it's effectiveness? If I hit a webpage that's interesting, and I think my friend would enjoy it, I can just copy the URL from my browser bar, paste it into the email and press "Send" button. In my opinion, it's usually faster and less mistake-aware then the button/link like this on the webpage. In addition, I'm not really sure what this website does with the emails I enter there - don't they store it and then sell for $1/100 addresses to spammers? My question is - when you design a website, do you put such links on the pages (it's often seen on sites with some news/articles)? Does it even make sense?

    Read the article

  • How do you plan for starting a new web system?

    - by Kerry
    I've been creating more and more systems recently and I find more and more planning and preparation I do before starting the project. I determine what libraries or frameworks I will be using, what languages, the basic architecture of how the site will flow, etc. I've also heard of other design processes such as hanging styrofoam balls to show where classes are and how they relate, which is a process I've never heard of nor do I know how it works. Is there any software that helps with this process? Are there any guidelines or steps or do you have a recommended set of steps or guidelines that you follow when designing a new project?

    Read the article

  • building an XML service parsing library

    - by DanInDC
    This is more of a design question I suppose. My company offers a web service to our client that spits data out in a custom xml format. I'd like to build a java library we can offer so our customers can just feed it the url and we will turn it into a set of POJOs built from the response. I can obviously just create a library that will do some simple xml parsing and building of the POJOs but I'm looking to build something a bit more robust. My brain is pulling me in a million directions, wondering if anyone has some pointers or some code to poke at. Was thinking about adding an Abdera extension, but it's not really a syndication format that fits the Abdera model. And most of the popular service libraries (twitter, facebook) all rely on standards format parsers, of which our format isn't.

    Read the article

  • Why and How to avoid Event Handler memory leaks ?

    - by gillyb
    Hey There, I just came to realize, by reading some questions and answers on StackOverflow, that adding event handlers using += in C# (or i guess, other .net languages) can cause common memory leaks... I have used event handlers like this in the past many times, and never realized that they can cause, or have caused, memory leaks in my applications. How does this work (meaning, why does this actually cause a memory leak) ? How can I fix this problem ? Is using -= to the same event handler enough ? Are there common design patterns or best practices for handling situations like this ? Example : How am I supposed to handle an application that has many different threads, using many different event handlers to raise several events on the UI ? Are there any good and simple ways to monitor this efficiently in an already built big application ? Thanks in advance!

    Read the article

  • Return an opaque object to the caller without violating type-safety

    - by JS Bangs
    I have a method which should return a snapshot of the current state, and another method which restores that state. public class MachineModel { public Snapshot CurrentSnapshot { get; } public void RestoreSnapshot (Snapshot saved) { /* etc */ }; } The state Snapshot class should be completely opaque to the caller--no visible methods or properties--but its properties have to be visible within the MachineModel class. I could obviously do this by downcasting, i.e. have CurrentSnapshot return an object, and have RestoreSnapshot accept an object argument which it casts back to a Snapshot. But forced casting like that makes me feel dirty. What's the best alternate design that allows me to be both type-safe and opaque?

    Read the article

  • Designing Relational Survey Questionnaires Database

    - by user1213055
    I'm trying to build a simple sql database for following access database. Currently there is no relationship and I just have two tables male and female with 6 sections in each form. How can I design it a better way so end user can connect to the database and analyze using STATA or SPSS ? I'm really confused whether I should create one table with all fields or break down into different tables. The database is specific to this study only so I'm not looking for a generic survey database where user can create surveys and capture them. Any feedback or suggestion is much appreciated.

    Read the article

  • What's wrong with the architecture of a game object drawing and updating itself?

    - by Ricket
    What are the reasons for and against a game object drawing and updating itself? For example, if you have a game where the player has a position on screen, why not have an all-encompassing class: public class Player { private int x, y, xVelocity, yVelocity; private Sprite s; //... public Player() { // load the sprite here, somehow? } public void draw(CustomGraphicsClass g) { g.draw(s, x, y); } public void update(long timeElapsed) { x += (xVelocity * timeElapsed); y += (yVelocity * timeElapsed); } } What is wrong with this design? What are the downfalls or concerns? How would you better write something like this, or better architect this type of thing in a game? Also, somewhat connected, how would you implement loading that Sprite image? And furthermore, how would you then implement collision between two Players? (I should probably separate these extra two questions into new questions, huh?)

    Read the article

  • Where do you find images and graphics designers for your softwares ?

    - by ereOn
    Hi, As a programmer, I'm sure some of you already experienced the same problem: You create a good software (free, open-source, or for friend-only diffusion, whatever) relying on good code and good ideas but since you're a programmer and not an image designer, your program looks just bad. While it seems pretty easy to find motivated developpers to join for free an open-source project, it seems quite hard to find a single free graphic designer. What free and good resources do you usually use for your programs/websites ? Do you have any cool tip that you're willing to share ? Do you know any place where to find people involved into graphic design willing to participate to open-source projects ?

    Read the article

  • How to relate keywords to records - Many to Many

    - by webworm
    Hi All, I am looking for suggestions on database design for a sample jobs listing application. I have many jobs that I would like to associate various keywords with. Each job can have multiple keywords. I would like to store the keywords in a seperate table instead of in a field within the Job table so as to avoid mispellings in keywords. What is the best way to relate keywords to the jobs? I was thinking of using an intermediary table that would have a many to many relationship linking keywords to jobs. Is this the best way to go or should I just have a field in the Job table that contains multiple keywords? Thanks for any suggestions.

    Read the article

  • SQL Server concurrency and generated sequence

    - by Goyuix
    I need a sequence of numbers for an application, and I am hoping to leverage the abilities of SQL Server to do it. I have created the following table and procedure (in SQL Server 2005): CREATE TABLE sequences ( seq_name varchar(50) NOT NULL, seq_value int NOT NULL ) CREATE PROCEDURE nextval @seq_name varchar(50) AS BEGIN DECLARE @seq_value INT SET @seq_value = -1 UPDATE sequences SET @seq_value = seq_value = seq_value + 1 WHERE seq_name = @seq_name RETURN @seq_value END I am a little concerned that without locking the table/row another request could happen concurrently and end up returning the same number to another thread or client. This would be very bad obviously. Is this design safe in this regard? Is there something I can add that would add the necessary locking to make it safe? Note: I am aware of IDENTITY inserts in SQL Server - and that is not what I am looking for this in particular case. Specifically, I don't want to be inserting/deleting rows. This is basically to have a central table that manages the sequential number generator for a bunch of sequences.

    Read the article

  • Javascript object encapsulation that tracks changes

    - by Raynos
    Is it possible to create an object container where changes can be tracked Said object is a complex nested object of data. (compliant with JSON). The wrapper allows you to get the object, and save changes, without specifically stating what the changes are Does there exist a design pattern for this kind of encapsulation Deep cloning is not an option since I'm trying to write a wrapper like this to avoid doing just that. The solution of serialization should only be considered if there are no other solutions. An example of use would be var foo = state.get(); // change state state.update(); // or state.save(); client.tell(state.recentChange()); A jsfiddle snippet might help : http://jsfiddle.net/Raynos/kzKEp/ It seems like implementing an internal hash to keep track of changes is the best option. [Edit] To clarify this is actaully done on node.js on the server. The only thing that changes is that the solution can be specific to the V8 implementation.

    Read the article

  • What are the differences between struct and class in C++

    - by palm3D
    This question was already asked in the context of C#/.Net. Now I'd like to learn the differences between a struct and a class in (unmanaged) C++. Please discuss the technical differences as well as reasons for choosing one or the other in OO design. I'll start with an obvious difference: If you don't specify public: or private:, members of a struct are public by default; members of a class are private by default. I'm sure there are other differences to be found in the obscure corners of the C++ specification.

    Read the article

  • benefit of having a factory for object creation?

    - by ajsie
    I'm trying to understand the factory design pattern. I don't understand why it's good to have a middleman between the client and the product (object that the client wants). example with no factory: $mac = new Mac(); example with a factory: $appleStore = new AppleStore(); $mac = $appleStore->getProduct('mac'); How does the factory pattern decouple the client from the product? Could someone give an example of a future code change that will impact on example 1 negative, but positive in example 2 so I understand the importance of decoupling? Thanks.

    Read the article

  • Drupal and Back-End Complexity

    - by Brian
    Currently I am working on a school website, and we are still in the decision-making process of choosing a framework (we know that we're not using Joomla! or hand-coding). Drupal came up as a viable choice, and currently, that is my best bet for the site. However, I have an issue with CMS's in general. I would like to develop a quite complicated and specifically custom-suited back-end application for teachers to interact with individual students, including the design of shared/custom calendars, announcement privileges, etc. I currently have a bit of expertise with HTML, CSS, PHP, MySQL, and I could wrap my head around some JavaScript and AJAX stuff if need-be. However, would such a complicated application work with Drupal (in that I could create it to specifically suite my purposes)?

    Read the article

  • c++ - what is faster ?

    - by VaioIsBorn
    If we have the following 2 snippets of code in c++ that do the same task: int a, b=somenumber; while(b > 0) { a = b % 3; b /= 3; } or int b=somenumber; while(b > 0) { int a=b%3; b /= 3; } I don't know much about computer architecture/c++ design, but i think that the first code is faster because it declares the integer a at the beginning and just uses it in the while-loop, and in the second code the integer a is being declared everytime the while-loop starts over. Can some one help me with this, am i correct or what and why ?

    Read the article

< Previous Page | 166 167 168 169 170 171 172 173 174 175 176 177  | Next Page >