Tag Info

New answers tagged

1

Use of reflection is often harmful in OO languages if not used with great awareness. I have lost count of how many bad questions I have seen on StackExchange sites where The language in use is OO The author wants to find out which type of object has been passed in and then call one of its methods The author refuses to accept that reflection is the wrong ...


1

there is problem in ur requirement gathering 1st u said "...(its the independent record) and then I can proceed with the person_id to create Phone,Email and Address" then u said : If the person creation succeeds but one or more preceding record creation fails then actually Employee creation fails" means it is not independent. lets assume its independent ...


1

B definitely sounds like the only sane choice. A means depending on implementation details of the REST API. It makes the "transaction" very fragile, breaks encapsulation, and other bad things. C I'm not entirely sure what you're saying you'll do with a QBWI (beyond the email to admin part), but it doesn't sound like an actual solution to the problem. ...


0

The way you've worded the question and comments implies that these are not instances of a single database, API, worker, etc, but separate pieces of software for each client. If so, you're essentially making a completely different product for every client, which is definitely not common or reasonable. If this is the problem you're having, you need to decide ...


0

A lot of this could be accomplished with virtual servers. As you grow in clients and expertise, you'll learn how this could be automated/scripted. You will also be able to monitor and decide how to scale the hardware. If your clients are paying for this service, you'll see how this can be marketed and priced so they feel they are getting their moneys worth. ...


1

My understanding of MVVM is that the term model doesn't refer to a specific model, but to the entire domain model. I think the confusion comes from the fact that many View Models (in my experience) exist to enable CRUD operations on an Entity. That makes it seem like model refers only to a single entity model. But a View Model doesn't need to be confined ...


0

Here's how I would implement it: Client opens a TCP/IP connection with Server and (assuming that succeeds) sends an HTTP packet to Server that says Client would like to be notified when Entity has an update. Server adds Client to a list of observers, noting Client's IP address. Server waits for notifications from Entity. Upon receiving an update from ...


0

Yes ...see the link below for this pattern... If you're writing an application which uses Peers -- or any complex app which requires robust Object-Networks I would use an Event-Driven Architecture. Using a Mediator or EventHub (Event-Aggrigator) The simplest approach would be to implement the Mediator Pattern designed by Addy Osmoni. This allows you to ...


0

Unit tests and Integration tests can be used to protect your logic from code changes. If you currently have a good code coverage, and you need to re-work a section, then the approach would be easier, you can change your tests to reflect the result after the re-work and once you have done the change you can re-run the test cases, to make sure it's all ...


0

Similar to what Robert Harvey proposes but instead of logging or signaling an exception when the boolean switch is true or false, always signal the exception and use a different exception handler depending on the switch. For instance, if the switch means to log silently, your exception handler should do that. Otherwise the exception handler would just ...


-1

It's never nice when things change, hope it hasn't got you down though. I do the architecture for our company as well and have asked some similar questions, so will share the little bit I know. Firstly I've found that there is no realistic solution for massive changes. The solutions I did find meant that everything had to be built so dynamically, that it ...


3

The only thing you can do to help reduce the impact of a change is to split your overall project up into many components, so while a major change will impact several of them, many will not be affected. eg if the customer decides they need a new button that sends data through the middletier to be stored in a new column in the DB, you're going to have to ...


1

Disclaimer: I'm not entirely sure I understand what you're actually trying to accomplish here, so my answer is going to be somewhat vague. Cron or Celery (haven't decided yet) will run all the .py files inside scriptFolder every lets say 15 mins Let's be optimistic and suppose you have millions of users some day. Will Cron/Celery be able to get ...


1

If it's just one API or function call, include a boolean switch in the function call that allows you to switch the error behavior. If this is something you want to implement on a system-wide basis, the best way to do it is probably in whatever logging strategy you are using. You can use a configuration setting to tell the logger to either log the error or ...


1

Validating for format validity on single fields, should happen as close to the point of entry into your code as possible. In this case it should be as close to the UI as possible. One reason for this is that this allows you to assume proper values from that point on. Another is that this allows you to check before actually processing anything which brings ...


2

Go for the second solution. Your AccountRequestValidator uses the db information and some rules to determine of the request is valid or not. Then use a "response" object, but don't create one yourself if you use a language that has already implemented that for you like Scala or Haskell. This type is usually called Either. It should throw an Exception if it ...


0

I to like DDD a lot, but it is tricky to apply it correctly and consistent. The cause of the difficulties you mention with ORM, OData and WCF is that these frameworks are almost considered part of the Domain, they know everything about the domain and have access to every part of it (data and logic). Most of the time this is not correct. Another problem is ...


3

Generally, this is not a good set up, because it's not DRY ("Don't Repeat Yourself"). If it were me, I'd work very hard to figure out how to have one well tested script which can generate the feeds needed by the individual users. Perhaps the script would get per-user information from the database.


2

It's not uncommon to do what you described. In fact, when you create a new database for your user, you basically creating a new file for that user. So, it just adding a file to the set of per user files. The choice of when to do the work begs explanation though. Doing the sign up process in batch periodically can create load spikes on the servers. It's ...


1

When choosing an open-source solution, it's useful if the solution has a well-known corporate backer. For example, Angular is backed by Google. As misguided as they are, one of the reasons people ask questions like "What frontend Javascript UI framework is the most popular" is because they want to know that others have used the product successfully, and ...


2

Yes, the Keys are the name or identifier of each property. You may add a changeValue method. This pattern is also known a the Dynamic Object Design Pattern. Example (Pseudocode): void Example() { KeyValueList MyControl = new KeyValueList(); MyControl->put("id", "MyControl"); MyControl->put("x", 34); MyControl->put("y", 125); ...


2

While views shouldn't contain business logic, they still can contain basic conditional logic, loops, etc. Since your website is “very heavily based on whether an event has occurred or will occur”, this is definitively a case where you'll have two views, not one. What questions could I ask myself to help me determine the best approach to take to this in ...


1

I've never used Laravel, so I'm not 100% sure this will work for you, but one method I've used in the past is to include either a list or an optional value in my viewmodel that contains the name of another model to render and the data to put there. The view then iterates over the list/checks for presence of the value and includes the appropriate view ...


4

Using native types (int, Guid, etc.) instead of types which express the intent (Price, ProductIdentifier, etc.) has two drawbacks: The type change is cascaded all over the code base, making it particularly painful. For instance, switching from smallint (short) to uniqueidentifier (Guid) is not only painful at database level (how do you transform ...


2

So lately I've been thinking that semantically the id is any unique identifier; the fact that it happens to be in the integer or the guid format is an implementation detail and exposing the fact in the type is a leaky abstraction. Thinking about it, exposing it as a string or a dedicated Identifier type has some advantages, it makes things easier to mock, ...


1

The biggest change is that the web front end (the part that runs in the browser) has gotten more sophisticated. There are many frameworks that provide enriched functionality at the client; Angular is just one of them. You can look here to find out more about what frameworks are available and what functionality they provide. There is the notion of a Single ...


7

However, the purpose of this is not to be a package manager, but instead a standard to follow when you want to implement a system that silently, automatically updates your software in the background. I'll look through apt and rpm! The problem is that what you want to do is building a package manager whether you like it or not. Your current ...


3

The original poster said: However, the purpose of this is not to be a package manager, but instead a standard to follow when you want to implement a system that silently, automatically updates your software in the background. While you can write an auto-upgrader it is hard to get it right without the package-manager ability to check inter-package ...


3

The core idea would be to find the difference between the set of files currently installed on someone's computer and the newest set of files that should be installed on that person's specific computer; and (once these differences are determined) download whatever new files are missing and discard whatever old files are obsolete; hopefully in an "atomic" way ...


0

I wouldn't differentiate between languages, I'd do it the same way in java. However I'm from the OO school rather than the functional (algebraic Haskell one or the lisp one). Haskell app design is really different from Scala or Clojure. Also a Scala.js app design is different due to stateful DOM - it is hard to fight stateful part of your app that is ...


1

If I may rephrase your question, you are asking "what happens to my system if something breaks?" Well, the short answer is that your system no longer functions properly. This happens all the time in complex systems. The degree to which you experience degraded functionality will depend upon what broke and how important it is. For example, when the space ...


0

I believe the concept of "Sprint 0" which might typically be a longer initial sprint covers this, doesn't it? Here's an article (What is Sprint Zero?) that I think describes what should be done in Sprint 0, including sufficient initial design to facilitate emergent design in subsequent sprints. The article describes some of the common misperceptions and ...


0

When I hear this argument against Agile versus waterfall, it sounds like they envision the history as, "We create these great specifications that the clients love because all of our projects are always on time and budget, but if only we could be lazy and accomplish the same thing without having to write requirements." That's not the way I ...


5

how can I best allocate work in initial sprints to catch the (probably inevitable) architectural issues in the solution as early as possible? By not mistaking quality of planning with quantity of planning. The entire point of agile is that planning is inadequate. Business people don't really know what they need until they can have customers try it out. ...


0

Grooming and spikes is the way we addressed this sort of thing, not always successfully I might add, all depends on how (of even if) the stories are written. We also have a dedicated architect, well some time from them. So in grooming people familiar with the backlog and the proposed architecture should be looking at how a 'new' story impacts what has or ...


5

The first mistake that often gets made is that people don´t look beyond the stories in the current sprint. While it is correct that those stories are not in scope now and might change or be removed at a moments notice, completely ignoring them when making high-level design decisions is a nice route to chaos. When making high-level design decisions, you must ...


1

You might consider managing your frontend dependencies with some dedicated frontend tools. A common combination is using Grunt and Bower to manage your javascript and CSS files. A dedicated setup like this makes it easy to do things like define different tasks for development and production, so while developing you include as many scripts and styles as you ...


1

Writing a NetworkClient specifically for the Core class does cause a dependency. Alternatively you can create an integration layer that abstracts the interaction of the two. For the sake of argument, call it a Service. The Service is neither implemented in the Core or NetworkClient. Typically the Service has knowledge of transporting a resource (e.g. some ...


1

I worked on a system that had a large Java application side, and a large Ruby side (both a Rails web site and JSON API). Beware the compatibility issues that can crop up when you keep two copies of domain models written in two different languages. You have to carefully plan your production releases so one application doesn't introduce data in the database ...


0

From an architecture point of view, I like to separate entirely the two layers, through a communication layer (web services, rest services...), like a standard SOA architecture. From my understanding, you have: Frontend (Presentation Tier) which you plan to realize in Ruby Backend (Business Tier) which you have to implement in Java You may want to ...


1

You might want to consider using a noSQL database for this specific data. This way you can just put your object in a record, no matter what the 'columns' are. Depending on the chosen database system (and implemented solution), you would be able to 'overwrite' a record with different data if you want. Of course, you can also save your historic data and just ...


1

Advantages: The display knows nothing about the business logic. You can't display something you know nothing about. Trying to invert control so the business logic calls some sort of display API just turns part of the business logic into display logic and intertwines the two. Then your business logic will break if the display API or display logic ever ...


1

When faced with a similar challenge several years ago, I went with DocBook. There were translators available for generating PDF, Word, HTML and other output formats. I had a number of difficulties with this approach. DocBook itself is very much oriented to producing books. Other document types are a specialization, but you need all the cruft. No such ...


-1

If you treat this problem as a workflow problem, you can employ one of the workflow tools such as jBPM or Windows Workflow Foundation and focus on the business logic and let the tool handle the persistence for you.


5

Sounds like you have 3 major categories of data you are trying to store: General job data (job id, job requester id, job receiver id etc) State transitions (job started, job finished) State-specific job data (optional) job-related events (price changed, job receiver user reassigned etc) The key is to separate event-like data from everything else. Schema ...


4

How about a hybrid of the two? A large table with a JobID and state (and perhaps other information common to all jobs and states), with other tables to manage the additional state information. That reduces (or eliminates) the duplication of data, but keeps things more manageable.


3

As GlenH7 has already stated, given the constraints you have listed in the question your problem is effectively unsolvable. Assuming "it can't be done" is not an acceptable answer we're left with having to change the constraints. One option you mentioned involved getting the mobile devices to preload the entire set of tickets. Your concern was that fraud ...


5

The ideal situation is to have a reliable connection to a single server so you can verify in real time that the presented ticket has not already been admitted to the event. As you pointed out, this is not always possible. A couple of nontechnical workarounds: Use assigned seating. Holders of duplicate tickets would have to sit on each other's laps. ...


0

What about an adhoc wifi network among the mobile devices essentially if a device scans something it broadcasts it to the other scanners so they know not to accept it again. You could lose data between the devices but assuming you have some level of connectivity working then you get enough data through to make attempting to exploit the system not worth it. ...


1

Determine a master responsible for each piece of data It seems very odd that both applications would need to change the same data. Instead, can you divide the data between the two applications so only one of the applications has the responsibility to change a specific piece of data? For example, the call center application itself could handle changes to the ...



Top 50 recent answers are included