C # – Architecture of the ASP.NET Core website with mobile application

I am planning to develop a large website that will contain mobile applications (for both Android and iPhone) in the future. I haven't done much web development (I'm still in school but I will graduate soon), but I plan to use ASP.NET (MVC or Razor sites and Blazor client side). However, I'm not sure what is the best industry approach to architecture for this application. Here are the options I'm considering:

  • Use the clean architecture to implement the entire app
  • Develop an ASP.NET core REST API
  • The website and the mobile apps access and change the data using the REST API

However, I'm not sure if this approach can be scaled and, above all, if it's the best way to do it. Although I know that my questions are very broad, would you please share your experience on how I could achieve my goals? specifically:

  • What is the most appropriate architecture used in the real world that I should use?
  • There are many approaches to developing mobile apps (native Java and Swift, many Javascript frameworks, Xamarin forms compared to Xamarin native, etc.). Based on your experience, would you please suggest which approach is suitable for my case? Suppose I have no experience, but I am willing and able to learn any technology.
  • All other suggestions (e.g. web resources, books and blog posts) are welcome. Suppose I am ready (and I have the illusion that I am able) to learn any technology in due course.

Design – architecture of a real-time collaboration application

I want to create an application similar to Google Docs that enables collaboration and presentation of documents in real time. In Google Docs, almost everything is in real time. From document creation to editing to deletion. I wonder what the architecture looks like for such an application. Do they use web sockets over traditional REST APIs? What are the advantages and disadvantages of using an API that consists of web sockets for the entire application with a user-defined JSON communication standard? Any reservations? How would anyone recommend approaching such an application?

Domain model – how do I deal with bad third party APIs in a microservices architecture?

I am currently transforming a monolithic application into a microservices-based architecture. The Monolith relies on third-party services (as in other departments) for its data. Most of these third-party services can be accessed via SOAP, while some of them use REST.

Some of these third-party services have terrible (even unusable IMO) APIs. It adds a lot of unnecessary complexity and boilerplate to our aggregator service (which is a monolith atmosphere). I'm about to map the domain of one of these third-party APIs to a usable domain in an ACL to be able to offer our aggregator service a decent API.

However, I was wondering. Is that the right way at all? It's a lot of work, should I just bite the bullet and use these terrible APIs? How do you deal with terrible third-party APIs in a microservices architecture that make your service less maintainable?

Thank you in advance!

Architecture workflow for a data-intensive, almost table-like management game

I'm absolutely fascinated by management games like Football Manager with dozens of spreadsheets and thousands of dates.

Coding everything in Unity, especially for a prototype, feels like a lot of useless UI work. Trying to do it from scratch with React also suffers from architectural problems …

What architecture or approaches would help address this problem?

Architecture – Queries as a service for other applications (neo4j)

I am new to neo4j and the diagram I am designing is used by third party applications for some fixed (cipher) queries – we can think of the classic "Who is a friend of Alice?" Think. Question.

I want these queries to be easily requested by the other applications – which can be developed in different languages ​​- without having to re-implement each query or inserting too many layers between the client application and the neo4j engine (that would work for me slow responses).

Of course, these questions are answered completely by Cypher queries or only resources from the neo4j database itself are used anyway.

So the diagram should serve as a service for other applications: how can such functionality be best provided? I aim for two goals: a) centralize query content; b) minimize the overhead of the layers.

A few ideas came to my mind:

  1. Add a service layer in front of the graphics database that is written in one language and can send requests to clients
    • The path would be client (i.e. Node.js) -> (rest maybe?) -> Service layer (Python?) -> Cypher (via Bolt) -> neo4j
  2. neo4j UDF
    • also client (i.e. Node.js) -> function via Bolt -> neo4j
    • I did not understand whether these would work similarly to native functions
  3. client (i.e. Node.js) -> Cypher over Bol -> neo4j
    • Of course, this would duplicate the query logic in each client and potentially generate errors
  4. other options that I haven't thought about

If this were an SQL database, I would have written stored functions for everything, and clients could just do it SELECT fx(data) – but since this is neo4j, I would like to hear some advice.

Solution 2 seems to be the best for me – I don't care whether it gives customers the opportunity to ask other questions. Maybe I can block them with permissions.

If another graphics database offers better support for my requirements today, I will of course also evaluate that.

Architecture – data sharing in a multi-instance application

First a clarification:

  • In a multi-tenant architecture, an instance of an application is shared between several tenants, but the data is divided so that each tenant only sees its own. This can be achieved with different patterns:
    • with one database per tenant
    • with a multi-tenant database
    • For a shared database, the application takes care of multi-tenancy by implementing a partitioning scheme
    • any hybridization if the above
  • In a single client application, each application instance is independent, serves a single client and uses its own client database.

Your scenario 1 is somewhat contradictory to multi-tenancy, as you exceed the limits that the architecture should ensure:
* The safest way to handle this is to organize the application-level connection as if it were a remote connection to a remote system. It is like any system interface. You can leave the tenants in control of the interfaces they accept.
* In the case of the shared database, you can simplify this type of connection because the application can easily read the shared data and implement the access control rules at the application level. It is the strength and weakness of this model at the same time.

In your scenario 2: With the exception of the scenario for shared databases, you have the problem that you have many (slower) cross-client queries. For example, if you need to link data from different tenants, you have to read a lot more records than if you could let the database do the work.

A proven but expensive approach is to create a data warehouse if you need to do a lot of analysis in this way. Then load the released data of the relevant clients into a shared database and make your cross-client queries there. A side effect is that the effort generated by the analytical activity does not affect the transaction activity of the tenants.

So whether you use multiple clients with one database per client or multiple instances with a single client should not significantly affect your scenarios.

Information architecture – what is the appropriate terminology to describe a page / view that represents a business concept?

What is the appropriate terminology in the context of an information system to refer to the views of business concepts?

For example, taking into account the StackExchange system, what are the correct names for the pages via a question. theme. useretc. Basically the most important "information concepts" of the domain. I consider these to be the core elements of the information architecture.

Possible names: & # 39; Information unit & # 39 ;, & # 39; Information object & # 39 ;, & # 39; View & # 39;, & # 39; Main page & # 39;, simple & # 39; Page & # 39 ;.

What is the appropriate term in the field?

Information architecture – How to distinguish navigation along the hierarchy from cross-references

You can conflict "back" and "up" if users expect it to work the way they are used to.

The back button is one of the oldest and most popular buttons in a web browser, and users quickly notice that they are returning to the page they just saw. While this corresponds to a level increase when you navigate through a hierarchy, it is just a coincidence. In another hierarchy, when a user clicks a link to a page that is unrelated to them, the user continues to expect the Back button to take them back to where they were. It is a kind of "escape hatch".

Your app should allow the user to use the browser's back button as often as possible. If you need to provide your own back button in your app, it should do the same thing and return users to the previous page in their history.

If you want to navigate up a hierarchy, consider a different interaction style. Breadcrumbs usually serve this purpose and allow users to jump directly to the parent container (e.g. projects / or users /).

Opening cross-references in a new tab can be an option to test. A new tab usually has its own browsing history, which also interrupts the "Back" button. However, the original page remains on the original tab, so the user still has an escape hatch, albeit in a different form. Give it a try and see how well your users can handle tabs. You could be thrilled or completely lost.

php – Architecture Design of the Command & Control Application Center for displays

I am faced with a dilemma on how to best design the following functions. What design patterns and OOD principles should I use?

For the sake of simplicity, the following basic requirements apply:

  • The display type can be one of the following: PC monitor, LG TV, Samsung TV or another manufacturer
  • Displays can have different functions, for example: switch on, switch off, sleep, etc.
  • Some ad metadata should be available, e.g.
    • Is CEC Link available and working
    • Is RS232 connection available and working
    • Is an HDMI cable connected?
    • Is the display currently on or off?
    • Get / set display resolution, etc …
  • Communication with displays can be done in one of the following ways
    • Commands for RS232 serial cables (manufacturer-specific)
    • HDMI CEC commands
    • As fallback (and for the monitors) we use EnergyStar functions, also known as. xset dpms force off

I know PHP better, but I will probably implement it in Python as it is more system language and I think it is more suitable for this task as well.

In the end it could be something simple, I suppose. It can be determined manually which connection is available for communication (cec | rs232) and which command should be sent via this connection, depending on the manufacturer of the display.

$display = new Display();
if ($display->isConnected() && $display->isOn()) {
    $display->turnOff();
}
$forfun = $display->getVendorName();

I've been thinking about implementing something along these lines, but I can already have some problems with it:

/** DisplayFactory classes */
abstract class AbstractDisplayFactory {
    abstract function makeDisplay();
}

class LGDisplayFactory extends AbstractDisplayFactory {
    private $context = "LG";
    function makeDisplay() {
        return new LGDisplay;
    }
}

class SamsungDisplayFactory extends AbstractDisplayFactory {
    private $context = "Samsung";
    function makeDisplay() {
        return new SamsungDisplay;
    }
}

/** Display classes */
abstract class AbstractDisplay {

    abstract function turnOn();}
    abstract function turnOff();

    function hasCecLink() {
        //return status;
    }
    function hasSerialLink() {
        //return status;
    }
    function isHDMICableConnected() {
        // return status;
    }

    // ....
}

class LGDisplay extends AbstractDisplay {

    function turnOff() {
        if($this->hasCecLink()) {
            // turn off via HDMI CEC - vendor agnostic commands
            // implementation of this would be better placed in a more generic class since
            // is vendor agnostic command, and we would not need to repeat it for every display
        }
        else if($this->hasSerialLink()) {
            // turn off via rs232 - vendor specific commands
        }
        else {
            // shell_exec('xset dpms force off')
            // this also would be better placed in a more generic class
        }
    }

    // ...
}

class SamsungDisplay extends AbstractDisplay {
    // similar as for LGDisplay class
}

I would be very happy to receive tips on how I could best approach this.

Architecture – Is there a way to generate a dependency graph of my microservices?

I have a general question, nothing special.

I was wondering whether there is a tool or a method that can be used to call up all dependencies of a micro-service architecture. I've researched online, but some tools that I find are strictly tied to a specific framework, mostly Spring Boot.

Is there a general method (a way, a tool) to do this regardless of your programming language or the framework used to create your micro services? Something you would do on your back-end that would generate a diagram of all of your micro services showing which micro service uses which local and remote other services?