|
I would have one field that says: this record is completely OK, it can be processed by all reporting or whatever actions your data deserves. So all existing, normal queries only must check one (or one more) field.
All other data is not yet completely OK; it is still in some input stage, and those stages could be identified using one or more fields, as appropriate. Separating the input stage codes from the "all OK" one makes sure your preparation and processing actions are independent of each other.
Just my 2ct.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Ahhh. Thank you for your 2ct's. Its great hearing different ideas as I was thinking about it from a different angle.
|
|
|
|
|
I have seen the projects that have brought run time scripting in to C# and the like. They seem to be very powerful projects, and that is great. For the application I have in mind, I'd like to have a more domain specific, limited scripting support available. Basically restrict the ability to call any method or object that is in the application scope.
I'd like to create a game that has objects with behavior that is "scriptable". The two obvious ways in my head are: A.) Create a graphical interface that allows users to drag and drop elements (if blocks, while blocks, etc.); B.) Allow the user to type in a syntax. (or really both, where A simply creates B)
In order to accomplish B, it seems like I'll need to learn something like ANTLR in order to create a syntax that is completely under control.
I am looking for some thoughts or advice on having an in-game script ability that does not access the entire namespace, while not having to write a syntax parser from scratch if possible.
Jeremy A. Cunningham
Kennebel
|
|
|
|
|
It all depends on the kind of commands/script statements you want to support.
Do you need variables?
do you need different types, like numbers and strings?
do you need program flow, like for loops?
etc.
Depending on the answers, a parser or parser generator might be right; or a simple lexer plus a switch statement might be all that is needed.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Thank you for responding.
. Variables, yes
. Types, yes (simple ones like int, float, string)
. Program flow would probably facilitate more advanced behavior
. An OOP option, no (to keep things simple, i don't plan on bringing objects in to the scripting portion of things, method just calls and basic program flow)
So it sounds like i'll need something pseudo-advanced, and will probably have to find, test, and learn a parser generator then.
Now I see why this isn't part of more applications.
|
|
|
|
|
it seems you need a parser; you may write your own, get one some where, or use a parser generator to generate one. The coice is yours, writing one yourself keeps you from studying the features, bugs, and shortcomings of existing ones; and using an existing one, or a generator, may keep you away from the nitty-gritty details involved. As I said, the choice is yours.
FWIW: I create my own parser when I need one.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Hi !
I've just visited this forum. Happy to get acquainted with you. Thanks.
__________________
Watch Splice Online Free
|
|
|
|
|
I understand what N-Tier is and have made many systems at college using its layered architecture (normally 3 or 4) however I don't know how to apply it in a game!
For example in XNA there is a LoadContent,Update,Draw methods for the game loop but I can only assume that the presentation tier apply s to the "draw" methods, business apply s to "update" and data layer apply s to anything such as loading maps or textures?
Also N-Tier design seems to be slightly counter productive in that its known for reducing performance, which in any game is unacceptable , is N Tier even a good solution for this?
Thanks !
|
|
|
|
|
A DAL could give you an abstraction on all IO, preventing references to the XML-libraries, the StreamWriters and, if applicable to a game, the database.
For all other layers, I'd wonder what value they'd add. See, the presentation-tier will probably be optimized, and you're probably not going to add another UI in ASP.NET.
venomation wrote: business apply s to "update"
That would be assuming that the entire state of the game is persisted (in a database) - I think you might want to optimize this, and only write what's required - and not the lot.
A ComponentLayer might be usefull if you plan on updating the monsters after your first release
I are Troll
|
|
|
|
|
Thanks for that, I done lots of research on N Tiered design but never really considered game development in any of its situations.
|
|
|
|
|
Personally, depending upon the type of game, Multi-tier architecture may not always fit well just due to the potential performance issues, unless you are talking tiers that all reside on the same system, and then it could even induce issues.
Remember, N-Tier is typically used to solve business level solutions where you can perhaps tolerate a bit of lag or delay between layers. In systems where people are going to expect near real-time performance N-Tier may NOT be the way to go.
Now, using for parts of the game like authentication, score keeping, maybe chat areas within the game, sure, but as far as actual game play (again, depending on the actual requirements of the game) N-Tier may not be the best choice.
|
|
|
|
|
Hi,
Has anyone read the book called The Data Model Resource Book by Len Silverston? There is 3 volumes. Is it any good? The data models that he describes, is it still a valid model to use, or is it outdated?
Any other data models that are worth mentioning?
Thanks
Brendan
|
|
|
|
|
Hi,
I'm reading a book on data models, there is a piece of text that reads as follows:
The subtypes within an entity should represent a complete set of classifications (meaning that the sum of the subtypes covers the supertype in its entirety) and at the same time be mutually exclusive of each other. What does this mean? Examples will be much appreciated.
Thanks
Brendan
|
|
|
|
|
Simple minded example.
Suppose an order processing system has a payment method field.
This would be the supertype - every order has to be paid.
Now suppose we break it down by the method used to make the payment.
We could have e.g. cash, cheque, debit card, credit card, money order, etc.
We need to ensure that all the possible methods are covered (i.e. the set is complete). We also need to make sure that a payment can only fall in one method. So, e.g. electronic payment (EFT) would not be allowed because it could be debit or credit card. I.e. debit and credit are mutually exclusive it's either one or the other but it cannot be both.
This assumes the system must distinguish between debit and credit card payments. If it does not need to do so it might be EFT is good enough.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
The only valid measurement of code quality: WTFs/minute.
|
|
|
|
|
Thank you
|
|
|
|
|
Hi all,
I've recently inherited a couple of projects that I am having a terrible time getting my head around.
As I stare at a method of 600+ lines that is doing all manner of unrelated things, trying to make sense of it I wonder:
Is there a formal name for what I am doing here? Surely this has a name, surely thousands of people have done this sort of thing before, surely there are resources to be had.
Any pointers I could get here? A generic approach maybe? Point me in a direction?
blah,
-Jack
|
|
|
|
|
Is this a .NET project? If it is, you can refactor it - there are tools that help. You could look at Resharper or Refactor!Pro to help you out.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hi Jack,
here is my basic approach:
- write initial documentation (basic design and information flow)
- write unit tests (at least a few, because you will need them after next step)
- refactor (there are many books about it, see also code refactoring[^])
- test extensively that functionality is still working and you haven't broken anything
- complete your documentation (to the extend needed)
Now you are ready to redesign and extend where needed. Btw, in some cases it is easier to just rewrite the whole mess from scratch, in any case keep the outer interfaces in the first refactoring round so you don't end up rewriting the whole application.
Hope this helps!
/M
|
|
|
|
|
Hi All,
We are using SOA for our windows Application.However we are confused with DAl layer.
First we started with Entity Framework,and it was dropped for some reason.
Second we decide to use the Linq , but microsoft stop the support.
third we are planning to use the Enterprise Library.
May I get some suggestion regarding Enterprise Library? or
suggest best technology for DAL Layer.
Thanks in advance.
Ramkumar
("When you build bridges you can keep crossing them. ")
http://ramkumarishere.blogspot.com
|
|
|
|
|
Ramkumar_S wrote: Second we decide to use the Linq , but microsoft stop the support
Microsoft scored a big own goal here - they haven't stopped support for LINQ, but they haven't been very effective in communicating this fact to people.
I suspect your team dropped Enterprise Library because it is very complex and still a bit erratic in its behaviour.
Now, if you want to go with something other than Enterprise Library, then I think you need to take a look into something like nhybernate - it's possibly the most popular .NET ORM out there right now.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Pete O'Hanlon wrote: I suspect your team dropped Enterprise Library because it is very complex and still a bit erratic in its behaviour
They didn't drop the Enterprise Library. They dropped the Entity Framework. The Enterprise Library is what they are considering next.
I've never used NHibernate, but I have used its Java big brother, Hibernate. It's good for small projects, or if your team isn't strong on SQL skills. But we found that once the application began to get more complex and the database grew in size it became harder to manage through Hibernate and some of the many-to-many relationships in particular were hard to model correctly. Overall, I would say I'm positive about Hibernate but it's not the panacea that some people think.
|
|
|
|
|
David Skelly wrote: They didn't drop the Enterprise Library. They dropped the Entity Framework. The Enterprise Library is what they are considering next.
I actually meant to put Entity Framework - the brain was thinking EF, the fingers were typing EL.
I've used nhibernate on larger scale projects, and it's very flexible. It seems to be significantly diverging from hibernate.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
I'm a great believer in roll your own, mainly because I'm an old fart who has all the tools/framework already built.
However one of our teams recently did some work in both EL and nHibernate. Its was concluded that the only reason for a framework was to maintain database agnostic code. There was approx a 50% speed penalty when moving from stored procedure to framework (we do batch processing rather than transactional systems).
As we have strong SQL skills (you don't get a job if you can code TSQL) we have retained the procedures and a fairly simple framework where each table is represented by a generated class (our own classbuilder app).
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
We are in the process of building a new enterprise application, that would comprise of an Oracle database, and a VB.NET application. Now my request to you all is to suggest the optimal architecture, in terms of technology, stability, maintenance, etc, bearing in mind that we would like to have a multi-tier application, with a thin client, and 1 to n business/persistence layers.
The application would be used by users who might be geographically separated.
Would appreciate your inputs on:
Winforms Vs ASP.NET?
Communication,
Data persistence,
Performance,
Any other criterion that you might consider important.
Your inputs would be highly appreciated.
Cheers/RB
|
|
|
|
|
RajeevBhatt wrote: Winforms Vs ASP.NET
Winforms does not really qualify as thin client, and will require setup and deployment. This increases the cost of operations.
RajeevBhatt wrote: Communication,
It depends on your network architecture. If you have a homogenous corporate network, with well configured internal firewalls, go for the framework that gives you the most functionality, like WCF. If on the other hand, you will have to deal with different authentication mechanisms or domains, or with firewalls that only allow certain types of communication, you may have to kick down to a lower level of in-built functionality.
RajeevBhatt wrote: Data persistence,
Again, it depends: you may use a persistence framework like the entity framework, but if your data is not well suited to relational operations (and is large enough), you may have to deviate a lot from standard mappings, in order to optimise performance, to the point where a persistence framework becomes more a burden than an asset.
RajeevBhatt wrote: Performance,
Architecting for performance will again depend on the functionality of the app. Will you be able to scale on different servers, or are the operations single-threaded by nature? Will you be able partition your database, or will the queries by their nature prohibit partitioning.
As you see there is no 'right' architecture. Architecture depends on what you want to do. It's the same with building architecture: If you want a lighthouse, you'll probably design a tower-like structure close by the sea.
It will probably be unusable as a soccer stadium though
|
|
|
|
|