Search Results

Search found 15233 results on 610 pages for 'ssis design patterns'.

Page 17/610 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Design considerations for temporarily transforming a player into an animal in a role playing game

    - by mikedev
    I am working on a role playing game for fun and to practice design patterns. I would like players to be able to transform themselves into different animals. For example, a Druid might be able to shape shift into a cheetah. Right now I'm planning on using the decorator pattern to do this but my question is - how do I make it so that when a druid is in the cheetah form, they can only access skills for the cheetah? In other words, they should not be able to access their normal Druid skills. Using the decorator pattern it appears that even in the cheetah form my druid will be able to access their normal druid skills. class Druid : Character { // many cool druid skills and spells void LightHeal(Character target) { } } abstract class CharacterDecorator : Character { Character DecoratedCharacter; } class CheetahForm : CharacterDecorator { Character DecoratedCharacter; public CheetahForm(Character decoratedCharacter) { DecoratedCharacter= decoratedCharacter; } // many cool cheetah related skills void CheetahRun() { // let player move very fast } } now using the classes Druid myDruid = new Druid(); myDruid.LightHeal(myDruid); // casting light heal here is fine myDruid = new CheetahForm(myDruid); myDruid.LightHeal(myDruid); // casting here should not be allowed Hmmmm...now that I think about it, will myDruid be unable to us the Druid class spells/skills unless the class is down-casted? But even if that's the case, is there a better way to ensure that myDruid at this point is locked out from all Druid related spells/skills until it is cast back to a Druid (since currently it's in CheetahForm)

    Read the article

  • Implementation/interface inheritance design question.

    - by Neil G
    I would like to get the stackoverflow community's opinion on the following three design patterns. The first is implementation inheritance; the second is interface inheritance; the third is a middle ground. My specific question is: Which is best? implementation inheritance: class Base { X x() const = 0; void UpdateX(A a) { y_ = g(a); } Y y_; } class Derived: Base { X x() const { return f(y_); } } interface inheritance: class Base { X x() const = 0; void UpdateX(A a) = 0; } class Derived: Base { X x() const { return x_; } void UpdateX(A a) { x_ = f(g(a)); } X x_; } middle ground: class Base { X x() const { return x_; } void UpdateX(A a) = 0; X x_; } class Derived: Base { void UpdateX(A a) { x_ = f(g(a)); } } I know that many people prefer interface inheritance to implementation inheritance. However, the advantage of the latter is that with a pointer to Base, x() can be inlined and the address of x_ can be statically calculated.

    Read the article

  • Design patterns for Agent / Actor based concurrent design.

    - by nso1
    Recently i have been getting into alternative languages that support an actor/agent/shared nothing architecture - ie. scala, clojure etc (clojure also supports shared state). So far most of the documentation that I have read focus around the intro level. What I am looking for is more advanced documentation along the gang of four but instead shared nothing based. Why ? It helps to grok the change in design thinking. Simple examples are easy, but in a real world java application (single threaded) you can have object graphs with 1000's of members with complex relationships. But with agent based concurrency development it introduces a whole new set of ideas to comprehend when designing large systems. ie. Agent granularity - how much state should one agent manage - implications on performance etc or are their good patterns for mapping shared state object graphs to agent based system. tips on mapping domain models to design. Discussions not on the technology but more on how to BEST use the technology in design (real world "complex" examples would be great).

    Read the article

  • Issue with class design to model user preferences for different classes

    - by Mulone
    Hi all, I'm not sure how to design a couple of classes in my app. Basically that's a situation: each user can have many preferences each preference can be referred to an object of different classes (e.g. album, film, book etc) the preference is expressed as a set of values (e.g. score, etc). The problem is that many users can have preferences on the same objects, e.g.: John: score=5 for filmid=apocalypsenow Paul: score=3 for filmid=apocalypsenow And naturally I don't want to duplicate the object film in each user. So I could create a class called "preference" holding a score and then a target object, something like: User{ hasMany preferences } Preference{ belongsTo User double score Film target Album target //etc } and then define just one target. Then I would create an interface for the target Classes (album, film etc): Interface canBePreferred{ hasMany preferences } And implement all of those classes. This could work, but it looks pretty ugly and it would requires a lot of joins to work. Do you have some patterns I could use to model this nicely? Cheers, Mulone

    Read the article

  • Abstract Design Pattern implementation

    - by Pathachiever11
    I started learning design patterns a while ago (only covered facade and abstract so far, but am enjoying it). I'm looking to apply the Abstract pattern to a problem I have. The problem is: Supporting various Database systems using one abstract class and a set of methods and properties, which then the underlying concrete classes (inheriting from abstract class) would be implementing. I have created a DatabaseWrapper abstract class and have create SqlClientData and MSAccessData concrete class that inherit from the DatabaseWrapper. However, I'm still a bit confused about how the pattern goes as far as implementing these classes on the Client. Would I do the following?: DatabaseWrapper sqlClient = new SqlClientData(connectionString); This is what I saw in an example, but that is not what I'm looking for because I want to encapsulate the concrete classes; I only want the Client to use the abstract class. This is so I can support for more database systems in the future with minimal changes to the Client, and creating a new concrete class for the implementations. I'm still learning, so there might be a lot of things wrong here. Please tell me how I can encapsulate all the concrete classes, and if there is anything wrong with my approach. Many Thanks! PS: I'm very excited to get into software architecture, but still am a beginner, so take it easy on me. :)

    Read the article

  • ASIHTTPRequest code design

    - by nico
    I'm using ASIHTTPRequest to communicate with the server asynchronously. It works great, but I'm doing requests in different controllers and now duplicated methods are in all those controllers. What is the best way to abstract that code (requests) in a single class, so I can easily re-use the code, so I can keep the controllers more simple. I can put it in a singleton (or in the app delegate), but I don't think that's a good approach. Or maybe make my own protocol for it with delegate callback. Any advice on a good design approach would be helpful. Thanks.

    Read the article

  • N-Tiered application design tool

    - by Ben V
    I'm beginning the design of a medium-sized web application. I usually like to design from the top down, i.e., start at the highest level and design my way down. I am planning to have the following layers: Presentation (PHP/Ajax) Business Logic Data Access Database Now I'd like to start sketching out the major objects in each layer and the interaction between layers. Is there a tool more specific to this purpose than just using a graphics/diagramming tool like Visio?

    Read the article

  • Best approach to design a service oriented system

    - by Gustavo Paulillo
    Thinking about service orientation, our team are involved on new application designs. We consist in a group of 4 developers and a manager (that knows something about programming and distributed systems). Each one, having own opinion on service design. It consists in a distributed system: a user interface (web app) accessing the services in a dedicated server (inside the firewall), to obtain the business logic operations. So we got 2 main approachs that I list above : Modular services Having many modules, each one consisting of a service (WCF). Example: namespaces SystemX.DebtService, SystemX.CreditService, SystemX.SimulatorService Unique service All the business logic is centralized in a unique service. Example: SystemX.OperationService. The web app calls the same service for all operations. In your opinion, whats the best? Or having another approach is better for this scenario?

    Read the article

  • amazon design doubt

    - by praveen
    I was looking at the amazon website and was wondering how one of the feature would have been implemented. The feature : what customers buy after viewing a particular item. If i were to develop such a feature i would probably generate a session id for each user session and store the session id-page id combination in a log file. and if a book is bought set a separate flag for the session id-page id. A separate program can then be run on the log file periodically, to identify the groups that were bought together/viewed together and that information can be stored in a persistent file. This is ofcourse a simple solution without taking into consideration the distributed nature of the servers - but would this suffice or can you help me identify a better design.

    Read the article

  • Design Pattern for Server Emulator

    - by adisembiring
    I wanna build server socket emulator, but I want implement some design pattern there. I will described my case study that I have simplified like these: My Server Socket will always listen client socket. While some request message come from the client socket, the server emulator will response the client through the socket. the response is response code. '00' will describe request message processed successfully, and another response code expect '00' will describe there are some error while processing the message request. IN the server there are some UI, this UI contain check response parameter such as. response code timeout interval While the server want to response the client message, the response code taken from input parameter response form UI check the timeout interval, it will create sleep thread and the interval taken from timeout interval input from UI. I have implement the function, but I create it in one class. I feel it so sucks. Can you suggest me what class / interface that I must create to refactor my code.

    Read the article

  • Server Emulator Design Pattern

    - by adisembiring
    I wanna build server socket emulator, but I want implement some design pattern there. I will described my case study that I have simplified like these: My Server Socket will always listen client socket. While some request message come from the client socket, the server emulator will response the client through the socket. the response is response code. '00' will describe request message processed successfully, and another response code expect '00' will describe there are some error while processing the message request. IN the server there are some UI, this UI contain check response parameter such as. response code timeout interval While the server want to response the client message, the response code taken from input parameter response form UI check the timeout interval, it will create sleep thread and the interval taken from timeout interval input from UI. I have implement the function, but I create it in one class. I feel it so sucks. Can you suggest me what class / interface that I must create to refactor my code.

    Read the article

  • What software design pattern is best for the following scenario (C#)

    - by askjdh
    I have a gps device that records data e.g. datetime, latitude, longitude I have an sdk that reads the data from the device. The way the data is read: A command packet (basically a combination of int values in a struct) is sent to the device. The device responds with the data in fixed size chunks e.g. 64bytes Depending on the command issued I will get back differect data structs e.g. sending command 1 to the device returns a struct like struct x { id int, name char[20] } command 2 returns a collection of the following structs (basically it boils down to an array of the structs - y[12]) struct y { date datetime, lat decimal, lon decimal } I would then want to convert the struct to a class and save the data to a database. What would be the best way to encapsulate the entire process, preferably using some established design pattern? Many thanks M

    Read the article

  • Design pattern for extending Android's activities?

    - by Carl
    While programming on Android, I end up writing a parent activity which is extended by several others. A bit like ListActivity. My parent activity extends Activity. if I intend to use a Map or a List, I can't use my parent activity as superclass - the child activity can only extend one activity obviously. As such I end up writing my parent activities with the same logic for Activity, ListActivity, MapActivity and so forth. What am I looking for is some sort of trait functionality/design pattern which would help in this case. Any suggestions?

    Read the article

  • Java Program Design Layout Recommendations?

    - by Leebuntu
    I've learned enough to begin writing programs from scratch, but I'm running into the problem of not knowing how to design the layout and implementation of a program. To be more precise, I'm having difficulty finding a good way to come up with an action plan before I dive in to the programming part. I really want to know what classes, methods, and objects I would need beforehand instead of just adding them along the way. My intuition is leading me to using some kind of charting software that gives a hierarchal view of all the classes and methods. I've been using OmniGraffle Pro and while it does seem to work somewhat, I'm still having trouble planning out the program in its entirety. How should I approach this problem? What softwares out there are available to help with this problem? Any good reads out there on this issue? Thanks so much! Edit: Oh yeah, I'm using Eclipse and I code mainly in Java right now.

    Read the article

  • Good design of mapping Java Domain objects to Tables (using Hibernate)

    - by M. McKenzie
    Hey guys, I have a question that is more in the realm of design, than implementation. I'm also happy for anyone to point out resources for the answer and I'll gladly, research for myself. Highly simplified Java and SQL: Say I have a business domain POJO called 'Picture' with three attributes. class Picture int idPicture String fileName long size Say I have another business domain POJO called "Item" with 3 attributes Class Item int idItem String itemName ArrayList itemPictures These would be a normal simple relationship. You could say that 'Picture' object, will never exist outside an 'Item' object. Assume a picture belongs only to a specific item, but that an item can have multiple pictures Now - using good database design (3rd Normal Form), we know that we should put items and pictures in their own tables. Here is what I assume would be correct. table Item int idItem (primary key) String itemName table Picture int idPicture (primary key) varchar(45) fileName long size int idItem (foreign key) Here is my question: If you are making Hibernate mapping files for these objects. In the data design, your Picture table needs a column to refer to the Item, so that a foreign key relation can be maintained. However,in your business domain objects - your Picture does not hold a reference/attribute to the idItem - and does not need to know it. A java Picture instance is always instantiated inside an Item instance. If you want to know the Item that the Picture belongs to you are already in the correct scope. Call myItem.getIdItem() and myItem.getItemPictures(),and you have the two pieces of information you need. I know that Hibernate tools have a generator that can auto make your POJO's from looking at your database. My problem stems from the fact that I planned out the data design for this experiment/project first. Then when I went to make the domain java objects, I realized that good design dictated that the objects hold other objects in a nested way. This is obviously different from the way that a database schema is - where all objects(tables) are flat and hold no other complex types within them. What is a good way to reconcile this? Would you: (A) Make the hibernate mapping files so that Picture.hbm.xml has a mapping to the POJO parent's idItem Field (if it's even possible) (B) Add an int attribute in the Picture class to refer to the idItem and set it at instantiation, thus simplifying the hbm.xml mapping file by having all table fields as local attributes in the class (C) Fix the database design because it is wrong, dork. I'd truly appreciate any feedback

    Read the article

  • 'is instanceof' Interface bad design

    - by peterRit
    Say I have a class A class A { Z source; } Now, the context tells me that 'Z' can be an instance of different classes (say, B and C) which doesn't share any common class in their inheritance tree. I guess the naive approach is to make 'Z' an Interface class, and make classes B and C implement it. But something still doesn't convince me because every time an instance of class A is used, I need to know the type of 'source'. So all finishes in multiple 'ifs' making 'is instanceof' which doesn't sound quite nice. Maybe in the future some other class implements Z, and having hardcoded 'ifs' of this type definitely could break something. The escence of the problem is that I cannot resolve the issue by adding functions to Z, because the work done in each instance type of Z is different. I hope someone can give me and advice, maybe about some useful design pattern. Thanks

    Read the article

  • Design patter for extending Android's activities?

    - by Carl
    While programming on Android, I end up writing a parent activity which is extended by several others. A bit like ListActivity. My parent activity extends Activity. if I intend to use a Map or a List, I can't use my parent activity as superclass - the child activity can only extend one activity obviously. As such I end up writing my parent activities with the same logic for Activity, ListActivity, MapActivity and so forth. What am I looking for is some sort of trait functionality/design pattern which would help in this case. Any suggestions?

    Read the article

  • which design choose? - pros and cons

    - by Guarava Makanili
    Which of these 3 approches would choose and why? // This is the one I would choose class Car { } class FeeCalculator { public double calculateFee(Car car) { return 0; } } // in that case the problem might be when we use ORM framework and we try to invoke save with parameter Car class Car { private FeeCalculator calculator; public double calculateFee() { return calculator.calculateFee(this); } } class FeeCalculator { public double calculateFee(Car car) { return 0; } } // in that case the problem mentioned above is solved, but I don't like this design class Car { public double calculateFee(FeeCalculator calculator) { return calculator.calculateFee(this); } } class FeeCalculator { public double calculateFee(Car car) { return 0; } }

    Read the article

  • CIC 2010 - Ghost Stories and Model Based Design

    - by warren.baird
    I was lucky enough to attend the collaboration and interoperability congress recently. The location was very beautiful and interesting, it was held in the mountains about two hours outside Denver, at the Stanley hotel, famous both for inspiring Steven King's novel "The Shining" and for attracting a lot of attention from the "Ghost Hunters" TV show. My visit was prosaic - I didn't get to experience the ghosts the locals promised - but interesting, with some very informative sessions. I noticed one main theme - a lot of people were talking about Model Based Design (MBD), which is moving design and manufacturing away from 2d drawings and towards 3d models. 2d has some pretty deep roots in industrial manufacturing and there have been a lot of challenges encountered in making the leap to 3d. One of the challenges discussed in several sessions was how to get model information out to the non-engineers in the company, which is a topic near and dear to my heart. In the 2D space, people without access to CAD software (for example, people assembling a product on the shop floor) can be given printouts of the design - it's not particularly efficient, and it definitely isn't very green, but it tends to work. There's no direct equivalent in the 3D space. One of the ways that AutoVue is used in industrial manufacturing is to provide non-CAD users with an easy to use, interactive 3D view of their products - in some cases it's directly used by people on the shop floor, but in cases where paper is really ingrained in the process, AutoVue can be used by a technical publications person to create illustrative 2D views that can be printed that show all of the details necessary to complete the work. Are you making the move to model based design? Is AutoVue helping you with your challenges? Let us know in the comments below.

    Read the article

  • Design for XML mapping scenarios between two different systems [on hold]

    - by deepak_prn
    Mapping XML fields between two systems is a mundane routine in integration scenarios. I am trying to make the design documents look better and provide clear understanding to the developers especially when we do not use XSLT or any other IDE such as jDeveloper or eclipse plugins. I want it to be a high level design but at the same time talk in developer's language. So that there is no requirements that slip under the crack. For example, one of the scenarios goes: the store cashier sells an item, the transaction data is sent to Data management system. Now, I am writing a functional design for the scenario which deals with mapping XML fields between our system and the data management system. Question : I was wondering if some one had to deal with mapping XML fields between two systems? (without XSLT being involved) and if you used a table to represent the fields mapping (example is below) or any other visualization tool which does not break the bank ? I am trying to find out if there is a better way to represent XML mapping in your design documents. The widely accepted and used method seems to be using a simple table such as in the picture to illustrate the mapping. I am wondering if there are alternate ways/ tools to represent such as in Altova:

    Read the article

  • How to design good & continuous tiles

    - by Mikalichov
    I have trouble designing tiles so that when assembled, they don't look like tiles, but look like an homogeneous thing. For example on the image below: even though the main part of the grass is only one tile, you don't "see" the grid; you know where it is if you look a bit carefully, but it is not obvious. Whereas when I design tiles, you can only see "oh, jeez, 64 times the same tile". A bit like on that image: (taken from a gamedev.stackexchange question, sorry; no critic about the game, but it proves my point, and actually has better tile design that what I manage) I think the main problem is that I design them so they are independent, there is no junction between two tiles if put closed to each other. I think having the tiles more "continuous" would have a smoother effect, but can't manage to do it, it seems overly complex to me. I think it is probably simpler than I think once you know how to do it, but couldn't find a tutorial on that specific point. Is there a known method to design continuous / homogeneous tiles? (my terminology might be totally wrong, don't hesitate to correct me)

    Read the article

  • How can I design good continuous (seamless) tiles?

    - by Mikalichov
    I have trouble designing tiles so that when assembled, they don't look like tiles, but look like a homogeneous thing. For example, see the image below: Even though the main part of the grass is only one tile, you don't "see" the grid; you know where it is if you look a bit carefully, but it is not obvious. Whereas when I design tiles, you can only see "oh, jeez, 64 times the same tile," like in this image: (I took this from another GDSE question, sorry; not be critical of the game, but it proves my point. And actually has better tile design that what I manage, anyway.) I think the main problem is that I design them so they are independent, there is no junction between two tiles if put closed to each other. I think having the tiles more "continuous" would have a smoother effect, but can't manage to do it, it seems overly complex to me. I think it is probably simpler than I think once you know how to do it, but couldn't find a tutorial on that specific point. Is there a known method to design continuous / homogeneous tiles? (My terminology might be totally wrong, don't hesitate to correct me.)

    Read the article

  • Development: SDK for Social Net

    - by loldop
    I have a task: development sdk for social networking service like facebook, twitter and etc. At now i'm developing facebook-extension-sdk which based on facebook-ios-sdk 3.0. But not all social networking services have good sdks. And all time i improved my facebook-extension-sdk, when i see ugly code :( Please, advise me good techniques to development these sdks (like design-patterns or your own experience or good books/sites). Thanks!

    Read the article

  • Cleanest RESTful design for purely "action" calls?

    - by Josh Handel
    Hello all, I am sticking my toe in the RESTful waters and I just can't find a "satisfactory" solution to how to handle truely "action" oriented calls on a RESTful service? My quandry can be broken down into two parts. 1) Transactional calls: I understand the idea of having an ActionTransactor that you get a resource too with a post, update the parameters and then commit with a PUT (as described all over the place and in the Orilly RESTful Web services book).. But I struggle with the idea of keeping URLs with states present for ever.. If we really honestly don't need to keep a transaction for ever can we kill the resource URI? do URIs need to be perminate or can they be transiant URIs that expire 2) Non transactional calls: these might be calls to perform some workflow that spans multiple resources but having a resource just doesn't make since.. An example might be to re-generating some calculated ans cached value like a large aggreget or re-indexing blog or some such "purely" action. Anyways, I'm curious about the communities thoughts on this... Thus far, I've read that Overloading Post is the cleanest way to handle part 2.. But there is an equal amount of argument against that approach as well. And (to me) its not self documenting which I though was one of the key design goals of RESTful APIs.

    Read the article

  • What is the best software design to use in this scenario

    - by domdefelice
    I need to generate HTML snippets using jQuery. The creation of those snippets depends on some data. The data is stored server-side, in session (where PHP is used). At the moment I achieved this - retrieving the data from the server via AJAX in form of JSON - and building the snippets via specific javascript functions that read those data The problem is that the complexity of the data is getting bigger and hence the serialization into JSON is getting even more difficult since I can't do it automatically. I can't do it automatically because some information are sensible so I generate a "stripped" version to send to the client. I know it is difficult to understand without any code to read, but I am hoping this is a common scenario and would be glad for any tip, suggestion or even design-pattern you can give me. Should I store both a complete and a stripped data on the server and then use some library to automatically generate the JSON from the stripped data? But this also means I have to get the two data synchronized. Or maybe I could move the logic server-side, this way avoiding sending the data. But this means sending javascript code (since I rely on jQuery). Maybe not a good idea. Feel free to ask me more details if this is not clear. Thank you for any help

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >