How to avoid cumbersome if/else constructs? [Something more like an architecture approach, not just switch statement] [closed] - swift

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I faced a task when I need to process a bunch of conditions and perform an action in the result. Are there any libraries or approaches that can help me building a structure like this? With replaceable/amendable conditions and results?

There are several patterns here, you can use Chain Of Responsibility to extract out the logic into separate classes.
If you want to fully extract it, there are rules engines that can help with that, making the if/else more data-driven. This has it's own concerns, namely around testing, promotion, etc...
Feel free to peruse my rant against rules engines: Method or pattern to implement a Business Rules Engine in a solution?

Related

Entity Framework with Waterfall or Agile? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I've seen plenty of posts on the pros and cons of the EF but finding quite hard to find anything on the relationship between EF and project management methodologies such as Waterfall SDLC and Agile?
Would anyone have any links or information on the above? Thanks.
Frameworks and methodologies are typically orthogonal.
The only (indirect) relationship is that Agile methods would have you build your application to be decoupled from the persistence mechanism altogether. In fact, you would delay even using a database until you have a user story that requires that you have one. This would force you to keep the two decoupled, leaving your options open.

Is there a way to create a series of UIAlertViews that are daisy chained into a decision tree? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Is there a way or a model by which I could create a "Choose your own adventure" type app using UIAlertViews?
While this is not a direct answer to the question, what you're going for here is going to provide a less than ideal user experience. Alerts are jarring and not really meant to be a constant UI element but more of an occasional interruption.
That said, if you do want to do something like this, using a block handler pattern rather than a delegate pattern will make the logic of your app much simpler and easier to follow.
For Xcode5/iOS7, I would recommend taking a look at BlocksKit which includes a category on UIAlertView to use completion blocks instead of a delegate.
New in iOS8 is the UIAlertController class which handles this very similarly without a need for an external component. It does require iOS 8 to use though.

What are the advantages of NServiceBus over MSMQ? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I know this as been asked but couldn't find an answer that I understand...
Some people told me about the main thing are sagas, but it doesn't look such a big advantage to make me spend my bucks on NServiceBus when I already have MSMQ....
That's a little bit like asking "why do I need ASP.NET MVC when I already have HTTP?"... a little tongue-in-cheek, but still with a lot of truth in it.
NServiceBus gives you message serialization, a sensible threading model, routing, and several ready-to-use messaging patterns out of the box.
MSMQ gives you... message queues! And a fairly complicated API with many low level options that give you no real pit of succes...

How to approach SRS [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
What is the best way to write the system requirement specification. Definition is given to me. project scope is very heavy.
Which model should i approach to get the detailed requirement from the client ?
Which are the common mistakes while gathering information from client and writing specification ?
Help appreciated.
First of all, you have to have a background in requirements engineering. As a start, look at the Volere templates, that help to organize the requirements in a meaningful way. The authors (the Robertsons) have written a book "Mastering the Requirements Process" (ISBN: 978-0321419491), but there are of course a lot of other authors.
There are a lot of techniques to get requirements from the customer, and it depends on how the customer behaves, in which area he is under way, and how much experiences he has there. It is not possible to give here any advice.
I don't think that there is a list of common mistakes that could help you in any way. Get an experienced requirements engineer, and follow his steps.

Techniques to detect Polymorphic and Metamorphic viruses? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
What techniques can be applied to detect Polymorphic and Metamorphic viruses?
How difficult is to implement these techniques?
Are these techniques being applied in modern day anti-virus softwares?
I thought most of the virus scanners nowadays use sandbox techniques to check for "bad" behavior. Therefore the polymorphic virusses will also be detected.
of course these detection techniques are also known to virus creators, and can easily be bypassed using a bunch of random, unharmfull, code executions before the actual payload.
It's impossiable to detect all known poly/metamorphic bad-code. White lists verification is the only provable technique. It's not always possiable, especially if your infrastructure/computer has not been maintainedd very well. Which is a good reason why signature, heuristic, emulation based detection is still valuable.