Skip to content

Design and Architecture

Discussions on Design, Patterns and Architecture

This category can be followed from the open social web via the handle design-and-architecture@forum.codeproject.com

5.3k Topics 10.4k Posts
  • 0 Votes
    6 Posts
    28 Views
    J
    Mr Yossu wrote: one of my co-workers is encouraging the team to put all code into the .razor.cs file So a single file. Unless the application is very small or there is zero functionality in that code then no that is a bad idea. And maybe even for the second it still might not be a good idea. Since presumably the file is modified by humans (not generated) then obviously the line count is a good demarcation. Is it going to be 100,000 lines long? Now? Or in the next 5 years then absolutely not. If it is 20 lines long now and will be at most 100 in 5 years then it doesn't matter.
  • Oh my goodness!

    question
    4
    0 Votes
    4 Posts
    22 Views
    D
    Yeah, I didn't even look at the name. :^) Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak
  • user data system for a web-based e-mail service

    database question
    26
    0 Votes
    26 Posts
    145 Views
    L
    I already stated that he should store a hash value. Nice to hear that you picked that up :thumbsup: Bastard Programmer from Hell :suss: "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
  • Graphic Design Institute in Delhi

    com design
    1
    0 Votes
    1 Posts
    9 Views
    No one has replied
  • Top 100 algorithm

    question algorithms
    3
    0 Votes
    3 Posts
    17 Views
    P
    If you don't want to sort the list, for whatever reason, you could always use a Max Heap structure with a heap size of 100. Iterate over your books and, if the new book has higher sales than a book in the heap, replace the bottom element with the new one. This assumes that no two book sales are going to be the same, so you would have to consider that particular wrinkle. In .NET for instance, you can use the PriorityQueue class to handle max heaps. Advanced TypeScript Programming Projects
  • Silly Logging Question

    help tutorial question com debugging
    3
    0 Votes
    3 Posts
    20 Views
    J
    The reality is that first, regardless of logging library, this is never clear in terms of practical programming. Additionally keep in mind that a potential exists that different logging levels might impact execution flow. There are three usage scenarios - Production - QA - Developer Some would claim that Error/Warn is only appropriate for Production. That however is simplistic and it will not work in non-trivial situations. That is because for larger systems debugging production problems often requires looking at execution flow. So logging that represents the successful execution of code (trace logging.) A perfect example of this is a job system or microservice (ms). In production the question will come up as to 'why' the job/request is not being handled. With logging one can see that the job/ms is actually running. Not just a specific requests, but all requests. Then trace logging shows or doesn't show that a specific request was handled. And how it was handled. Trace logging would use a log level of 'Info'. So Prod would use Error/Warn/Info. The claim would (and will) be made that the log level 'Debug' allows one to turn something on in production for more information. But often that doesn't matter because the failure occurred yesterday, so attempting to figure it out today with more logging is seldom going to help. The 'Debug' level is often used by developers because of this. But developers often do silly things like log only the index of a for variable. So no context just the value. Which makes sense when they are figuring out a problem but will make no sense and likely add a LOT of noise if you really do turn on 'Debug' in production. Because of that then one must do code reviews to insure at least that Debug logging provides a context and does not cause significant (useless) noise. All of that then comes back to QA. What should they run? If you actually want to allow Debug logging and it will be turned on in production then you then need to test both with it on and with it off. So testing twice. Both to insure there is not too much noise and that it does not interfere with functionality. Due to all of that for me I limit all code check ins to Error/Warn/Info. And in practice I haven't even used Warn for a very long time. Kevin Marois wrote: Exception logging I get, but is this how you would Info and Debug? Pseudo code for a trace log entry. Log.Info("CreateRequest: RequestId=<
  • Why I don't do MVVM.

    wpf com debugging regex architecture
    11
    0 Votes
    11 Posts
    28 Views
    J
    And that guarantees that it will not have "too many layers"?
  • 0 Votes
    1 Posts
    4 Views
    No one has replied
  • Talking Cat Emma Ballerina Mod Apk

    android com game-dev
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • Implementing domain driven design

    question design tutorial
    2
    0 Votes
    2 Posts
    7 Views
    L
    There's a physical model and a logical model; I don't see you addressing the logic model. ("value objects"?) You're creating interfaces, and unit tests, while the overall design is still incomplete, IMO. Wouldn't be able to "approve" your plan, Just what I "see". "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
  • 0 Votes
    15 Posts
    40 Views
    D
    Here's the literature I was able to find through libera on IRC. Very helpful to me. Hopefully also helpful for other people reading this.. ## Online: - [Oso - Authorization Academy](https://www.osohq.com/academy) - Very helpful; Starts with the basics, then talks where to impl auth and why, and how. ## Books In regard of books I found that looking at the references can help. In combination with archive.org's free book library it's possible to skim over books quite quickly - I used *Security Engineering* (second edition on the page is freely available) as a reference guide to find other books - [*Basic Principles Of Information Protection (JEROME H. SALTZER)*](http://web.mit.edu/Saltzer/www/publications/protection/Basic.html) was an interesting resource. - Access Control, Authentication, and Public Key Infrastructure Jones & Bartlettt Learning Information Systems Security & Assurance Series - *Andrei Sabelfeld* was suggested to me (also as a reference guide). Couldn't check it out, yet. ## Specific topics ### Object Capability System: Quote: the object graph _is_ the permission graph, and so there are no separate access control checks that you have to make like shown in that slide. An object has authority to call methods on another object if and only if it actually has a reference to that other object. Links: - [Habitat Chronicles: What Are Capabilities?](http://habitatchronicles.com/2017/05/what-are-capabilities/) - [http://erights.org/talks/thesis/markm-thesis.pdf\](http://erights.org/talks/thesis/markm-thesis.pdf) - [Bringing Object-orientation to Security Programming (Mark S. Miller, Google) - YouTube](https://www.youtube.com/watch?v=oBqeDYETXME) OT Here's some basic insight I've gained during looking at various sources. The basic question *you* want to get answered is `has_access(user, action, resource)`. *Example:* `has_access(uid, read, user_list)`. You might want to take it even more abstract and say `has_access(entity, action, resource)`, where `entity` could be a user, a group, an organization or anything else that is able to perform actions in your system. Perhaps even `has_access(resource, action, resource)` might be an appropriate abstraction. With a hierarchical permission struct
  • 0 Votes
    1 Posts
    4 Views
    No one has replied
  • Lawn Mower Buying Guide | Everything You Need to Know

    com tutorial learning
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • History of the Coffee Maker | A Journey Through History

    com data-structures
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • 0 Votes
    7 Posts
    22 Views
    P
    If you want people to appreciate the benefits of this approach, write an article, hosted here on Code Project showing a non-trivial application created using these techniques. I find myself deeply distrustful of prescriptive ways of working when they are presented as absolutes (e.g. "Functional dependencies are evil!"). No approach is 100% perfect and, generally, there are always be exceptions to the absolutes that are the driving reason for a new way of working. Advanced TypeScript Programming Projects
  • How to address security in white label software

    javascript json com devops docker
    4
    0 Votes
    4 Posts
    13 Views
    V
    Updated software across all operating systems is the only way to ensure your white label product is secure on every level. At BaseKit, we protect underlying operating systems using automated tools to monitor for vulnerabilities in software libraries. Ozempic Kopen Belgie | Ozempic kopen Online | Ozempic Kopen[^]
  • Validate Data Format

    csharp database wpf design sales
    8
    0 Votes
    8 Posts
    26 Views
    A
    I agree 100%, have some or other way to capture this to be used in the future, irrespective of which customer adds what as their own reference. Just do a callback then to that specific customer and you should be able to tie up the reference to the correct file reference.
  • How to address security for white-label web app

    javascript json com devops docker
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • 0 Votes
    1 Posts
    4 Views
    No one has replied
  • R. Ball and Son Ltd

    1
    0 Votes
    1 Posts
    4 Views
    No one has replied