FAQ Database Discussion Community


In MVC is the View allowed to see but not talk to the model?

architecture,design-patterns,model-view-controller
I have been reading up on MVC and have been trying to follow it to the best of my ability but one thing keeps coming up. Can the Views see Model Objects? My current structure for my game is as follows. Objects(Model) <-> Scene (Controller) <-> Sprites (View) Currently I...

What is meant by the most restrictive type in C?

c,architecture,malloc,long-integer,memory-alignment
The book The C Programming Language talks about "the most restrictive type" in section 8.7, Example — A Storage Allocator: Although machines vary, for each machine there is a most restrictive type: if the most restrictive type can be stored at a particular address, all other types may be also....

os kern error : “ld: symbol(s) not found for architecture x86_64”

c++,architecture,compiler-errors,x86-64,clang++
I have looked all over Stack Overflow and other websites about this famous error, and all of them are very specific, and in my case I cannot find a solution. I am making an ncurses application and when i try to compile it, it causes the following error: Undefined symbols...

Where to format collections / objects

javascript,backbone.js,architecture,project-structure
From front end architectural point of view, what is the most common way to store scripts that perform transformations on collections of objects/models? In what folder would you store it, and what would you name the file / function? Currently I have models, views, controllers, repositories, presenters, components and services....

Location of Shared Kernel in Onion Architecture

architecture,domain-driven-design,onion-architecture
I'm creating an application using Onion Architecture for the first time. All the concepts of the Onion Architecture make perfect sense to me so far but what I'm wondering is, where do you place Domain Driven Design's "Shared Kernel" within the Onion Architecture? I've seen some people say it should...

Is this pseudo-derivative END function executable?

assembly,architecture
Consider the below Assembly code using x86 assembler. MOV R1, 40; MOV R2, 1A; LAB 1 CALL SUB1; SHL R2; DEC R3; CMP R1, R2; JNE LAB1; END; SUB1 PUSH R1; MOV R3, 4F; LAB2 DEC R3; CMP R1, R3; JLE LAB2; POP R1; RET; Is END an executable instruction?...

How to measure redundancy in code bases?

architecture,software-engineering,software-design,redundancy,entropy
I inherited a medium-sized code base, whose only programming paradigm appears to have been Copy&Paste. There are literally dozens of code snippets that could be easily parametrized and replaced by a simple function call. The code isn't mission-critical, as it's "only" testing code. Nevertheless this makes it a pain to...

Web services, architectural design advice for central logging

web-services,logging,architecture
We have a certain number of SOAP and REST Web Services, which provide legal information for clients. Management demands to log all the information which is requested by this services. Using logs they want to collect statistics and bill clients. My colleague offered to use central relational database for logging....

How to asynchronously send data to a client via a different application path?

web-applications,architecture,scalability
I am currently researching large scale application optimisation and scaling, and through my research I have gotten to grips with the standard ways of doing large scale with DNS Round Robin for splitting the load across load balancers, using load balancing to divide traffic across web-servers like Nginx, which again...

How to integrate RequireJS module into AngularJS application?

javascript,angularjs,architecture,requirejs
I want to integrate RequireJS module into AngularJS application. Below you can see a sample code. How do I load Module from module.js in my app.js? Edit: look at this solution I posted as an answer myself. Do you have any comments about it? // module.js define('Module', [], function() {...

Subtypes of an interface only compatible with a subtype of another interface

oop,design-patterns,design,architecture,solid-principles
I've been scratching my head for a long time on a problem and I still don't know what would be the best solution. Since the application domain is very technical, I'll illustrate my problem with a simple example. Suppose I have the following interfaces: public interface Animal { public void...

How to look at a .NET project architecture at a glance

c#,.net,architecture
We are working on an enterprise level .net project, where-in we have a huge code base. We have our own different small frameworks implemented in the project. While working, many a times it happens that I want to see a particular module's (or it's framework's) class hierarchy at a glance,...

More generic TryParse() of line of a PLY file

c#,parsing,inheritance,architecture
I'm building an import function to load an PLY File into my program. The part I'm unsure about is the implementation of the Face-Parser. Such a face might come in two different versions, Face3 (connecting 3 vertices) or Face4 (connecting 4 vertices). In the *.ply file, they might look like...

Client-Server architecture: 100% Android (Android as a server) or J2EE+Android?

android,java-ee,architecture,client-server,distributed-computing
Context I am considering going into a client-server architecture with Java. The idea is that several Android tablets (let's say around 15) need to display a content from a server. Content can vary times to times (e.g. day display v/s night display). Furthermore, tablets will also display a Yes /...

Symfony: Issuing request to another bundle in same app to get data

php,symfony2,architecture,soa
I have a bit of a dilema, I have a Symfony2 app and in it I've built a bundle which is just a REST Api layer to my database. The thing is that I have another bundle, and I want it to perform some updates in the database. I don´t...

What visual studio project template should I use for a project consisting mainly of classes?

c#,.net,wcf,architecture
This is how my solution looks like: In "Application" I want to create an Application Service that will contain Unit Of Work operations. In "Presentation" I will have an WCF service. Does anyone know what type of project should an Application Service be?...

Best practices : Symfony comments

symfony2,interface,architecture
In my application, I have to allow my users to comments two kind of entities : Recipe and News. I want to know what is the best practice for doing it. A Comment object with a ref_id(integer) and ref(string) that I manage manually or a commun interface between my to...

How to structure app in purescript

haskell,architecture,purescript
I've decided to try functional programming and Purescript. After reading "Learn you a Haskell for great good" and "PureScript by Example" and playing with code a little I think that I can say that I understand the basics, but one thing bothers me a lot - code looks very coupled....

Application & Database architechture

.net,database,database-design,architecture
Whenever I design a database (currently SQL Server), I always wonder what if in future I had to migrate to another database (Oracle, MySql) is a best way of take some important parameters into consideration like naming conventions (tables, columns including the length), data types, etc. Quite often I ask...

Salt minion inside docker container?

architecture,docker,salt-stack
Do you run a salt minion inside a docker containers? Or do you only run a minion on the server which runs the docker containers? We don't use salt at the moment, but want to use it in the future. We are unsure how to layout our infrastructure in the...

How can I add a whole directory structure into a solution?

visual-studio-2013,architecture,solution,visual-studio-2015
There's a directory structure (the root folder and a bunch of subfolders with their subfolders in them etc.) and I'd like to keep these in our TFS, as a part of the solution, even if those are not source code files and don't belong to a project. Optimally, those would...

The maximum number of objects that can be instantiated with a Django model?

python,django,mongodb,python-2.7,architecture
I wrote an app to record the user interactions with the website search box, the query string is saved as an object of the model SearchQuery. Whenever a user enters some data in the search box, I can save the search query and some info related to the query on...

Managing hierarchical tasks with module/mediator/facade pattern

javascript,design-patterns,architecture
Say I've got a very intensive programatic task to complete, big task, which can broken down into smaller well-defined sub-tasks: big task small task 1 tiny task 1 tiny task 2 ... small task 2 ... ... Each sub-task takes data from the parent task, runs the relevant calculations, and...

Architecture/Design - Where to store app configuration?

php,laravel,design,architecture
I am building a web app in Laravel. I have many app configuration options, such as: prices of paid plans maximum days on trial mode maximum number of points a free user can have default email sender address These options are used thoughout the app and should be available most...

How to organize my code?

laravel,optimization,architecture,laravel-5
I'm still in a learning phase with PHP and Laravel 5 and since I upgraded to L5, I struggle with where my code belongs to. There are so many files and folders which seem to have the same purpose or at least are very similar. There are Commands, Controllers,...

Architecture/Design with Interfaces (Refactoring help)

c#,architecture,rss,solid-principles
I need your help about a design I made that I'm not happy with. The application is consuming RSS news (The articles's RSS, and the comments's RSS of each article). I made an interface called IDataService which provide the basic behavior of the data provider. public interface IDataService { Task<List<Item>>...

How Do SaaS Companies Deal With Corporate Clients That Have Restrictive Firewalls

security,architecture,firewall,saas
I'm responsible for a web application that is used in several corporate environments. The application is also used by many non-corporate users. Recently I've been hearing issues with corporate users not being able to user certain features of the application. I'm guessing (don't know for sure) that they are behind...

What's the recommended way to load an object graph from Data Access Layer?

c#,architecture,domain-driven-design,data-access-layer,software-design
From a relatively old software architecture book: In other situations, the same conceptual Get-Orders query might generate different data—for example, a collection of Order objects plus order items information. What should you do? Should you expose two slightly different GetOrders methods out of your DAL? And what if, depending on...

CQRS and calculations

architecture,cqrs
I am currently working on some proof-of-concept code that follows the CQRS pattern and I cannot find a satisfactory solution to a problem I [think I] have. The system calculates the impact of market changes against a given portfolio based on specific scenarios. Portfolios can contain from one to several...

How to do Constructor Dependency Injection in Netbeans Platform

java,netbeans,architecture,dependency-injection,netbeans-platform
I'm asking myself for a while how to do CDI in Netbeans Platform especially with TopComponents or subclasses of them. Now i'm using LookUps to get my dependencies and for inter-module-communication and it's working fine, but the dependencies of my components are not visible to the outside like it is...

Corba Async call issue

java,asynchronous,architecture,corba
I have the following requirements: Implement a simple pipelined job service (further PJS). Client writes a very simple application form and put it to PJS. PJS consists of several individual processes that handles application in sequential order: Verifier is responsible for verification of the application form format. It might be...

Referencing two adjacent rows in a relational database

sql,database,architecture
In my database, I have a table that has to get info from two adjacent rows from another table. Allow me to demonstrate. There's a bill that calculates the difference between two adjacent meter values and calculates the cost accordingly (i.e., I have a water meter and if I want...

Data flow of MVC application architecture

c#,asp.net-mvc,architecture
Attempting to validate the approach for data flow in an MVC application that i am cleaning up and streamlining, (after a bit of refactoring) things currently looks like the diagram below (Data flow indicated by arrows). and some parts are written to access the the repository services jumping over layers....

WebAPI OData frontend with WCF Data Services backend

entity-framework,asp.net-web-api,architecture,wcf-data-services
In a project I'm working on, there's a need for following architecture (simplified): [WebAPI] -> [WCF -> Entity Framework] -> [Database] I've seen a lot of demo's where you can expose your Entity Model directly over a WebAPI with OData syntax. I was wondering though, whether it is possible to...

How to pass different parameters to different http request classes that implement the same interface

c#,oop,design,interface,architecture
I am developing a C# program that has to do various HTTP request to get different kinds of information (price of a specific item in a region, history of prices for an item, route between two region, etc). I have started by implementing an IRequest interface that contains two properties...

Aspect of DB architecture

database,database-design,architecture
For example, I have 3 types of some entity, let's name it as Offer. So, can be AcceptOffer, DeclineOffer and OutstandingOffer. AcceptOffer: - UserID - ContactID - Notes - FirstContactDate - LastContactDate [... and 5-10 the unique fields...] DeclineOffer: - UserID - ContactID - Notes [... and 5-10 the unique...

What does this mean? #if !(arch(x86_64) || arch(arm64))

swift,if-statement,architecture
I came across this unusual code in a tutorial I was using. #if !(arch(x86_64) || arch(arm64)) func sqrt(a: CGFloat) -> CGFloat { return CGFloat(sqrtf(Float(a))) } #endif It looks nothing like the code I've been learning so far. I know it's a square root function but the hashtag? Something about my...

Saving data to file - What object should be responsible?

java,junit,architecture
Context: I am writing a program that identifies test cases that are potentially redundant. I am using AspectJ to trace each test call path and construct a calling context based on this and after the tests are completed I perform analysis on this and produce the results. Depending on the...

What is a good practice to promote a microservice to a public API?

design,architecture,microservices
Microservices seem to be a very good fit for my software after watching and reading number of articles from Martin Fowler, Sam Newman, Adrian Cockcroft and Sudhir Tones. However, when thinking deeper into the implementation, there are number of concerns: My software has an UI, let's call it a web-based...

What is the best way to deal with this Namespace JavaScript Structure?

javascript,architecture
i have an object as namespace with three main-objects. I call this object one time and after this it is working for itself. My Code is structured like this: var Application = Application || {}; Application.Module1 = { //Code with some functions } Application.Module2 = { //Code with some functions...

Communication between desktop application and web frontend

html5,architecture,go,websocket
My project can be divided into 3 components: Desktop application, Server backend, Server frontend. I am using websockets application-backend and backend-frontend communication. Frontend is single page application. Whole looks like this: I need to implement communication between frontend and application (dotted arrow in the picture above). I am able to...

Correct way to write a resource to get states from a country in a RESTful API?

php,rest,url,architecture,restful-architecture
I'm in doubt which of the two options is correct when listing states from a country. Group State Collection [GET] /location/states?country={country_id} Or Group Country Collection [GET] /location/country/{id}/states Which is the correct way in a well write RESTful API?...

How to integrate different data struct into one ? Any design pattern or exprience?

c++,design-patterns,data-structures,struct,architecture
As you know, different vendor may have different name of data field. Although the name is difference, the data struct is almost the same. For example, struct s1 { int s1Price, int s1Volume }; struct s2 { int s2Price, int s2Volume }; Like stock market data, the data would sent...

Where does Elixir/erlang fit into the microservices approach? [closed]

architecture,erlang,docker,elixir,microservices
Lately I've been doing some experiments with docker compose in order to deploy multiple collaborating microservices. I can see the many benefits that microservices provide, and now that there is a good toolset for managing them, I think that it's not extremely hard to jump into the microservices wagon. But,...

Scheduled, long running user queries

c#,wcf,encryption,service,architecture
I need some suggestions from the community to a requirement I have. Below is the requirement and I need some approach suggestions. Users from the client need to retrieve data from my source database (Let say SQL database in my production server). The users access the data by a intermediary...

Is there any tool to generate uml diagrams for Ruby on Rails [closed]

ruby-on-rails,architecture,uml
I want to know whether any tool is available to generate uml diagrams based on the ruby class files. My Rails version: 2.3.14 Ruby version: 1.9.3p547 Thanks for the help...

Replacement for Excel/Tableau-centered Analytics Architecture

sql-server,excel-vba,architecture,analytics,tableau
I have an architecture question for a mid-sized analytics team. == background == We are data firm using RDMS (SQL Server). We have a web site showcasing the raw data and some basic analytics which are all handled by either SQL or dotNET. We have an analytics team who manage...

How to use single object and fill its properties throughout all sub process in single webapi request?

c#,design-patterns,architecture,asp.net-web-api2,simple-injector
I have an Asp.net WebApi Project and i am using Simple Injector for dependency injection. I have some messages, message handlers , decorators on my project. I am using decorator pattern. I need to keep details of each process and i need to save them to database.For example, i want...

Micro Service cross service dependencies

architecture,microservices
Just to simplify my situation I currently have 3 micro services. Authentication Locations Inventory The authentication service authenticates the user and sends back a JWT access token and I use that across the other services. Its stateless and all works well. I setup locations among some other things in the...

Equivalent to Interfaces in Embbeded C / Code organization

c,architecture,preprocessor,c-preprocessor
I'm developing embedded C code on EFM32 Cortex M3 processors, and after a few months the code is beginning to get crazy... By this I mean that we changed the hardware so we get different versions, on which we changed some components, moved some IOs, have different states for theses...

Database externalization in Onion/Hexagonal architecture

architecture,domain-driven-design,onion-architecture
I thinking about writing an app using an onion/hexagonal architecture pattern. I'm stuck on a database externalization. My app need to make some complex data queries to fulfill a use cases. I have two aggregates "A" and "B" and they are related. To fulfill UseCase1 I need to get all...

How to handle fail situation into a simple Java application?

java,java-ee,exception,architecture,exception-handling
I am a Java developer but I have not yet got a lot of experience in software architecture. I have the following situation. I am creating a batch application (a command line application that run into the shell) so it is started from a main() method defined into a Main()...

Some doubts related this Swing MVC implementation. Opening a database connection should be a Controller task?

java,swing,design-patterns,model-view-controller,architecture
I am following a Java tutorial related to the implementation of the observer pattern (using Swing) and I have some doubts. My doubts are not related to the observer pattern but about the architecture of this tutorial application (that is based on something like an MVC logic) So it contains...

How to use MessageQueue in Crawler?

architecture,web-crawler,message-queue
It seems that MessageQueue should be a good architectural solution for building Web Crawler, but still I can't understand how to do it. Let's consider the first case with shared database, it is pretty clear how to do it the algorithm would be the classical Graph Traversal: There are multiple...

Why do Examples of the Repository Pattern never deal with Database Connection Exceptions?

architecture,exception-handling,repository-pattern
I've read a lot of tutorials and seen a lot of code samples regarding implementations of the Repository pattern. In pretty much every case, exceptions that would result from attempting to hit the database when the database is unavailable is not addressed. This seems strange considering that this is a...

How does ETL (database to database) fit into SOA?

database,architecture,soa,etl,decoupling
Lets imagine, that our application needs ETL (extract, transform, load) data from relation database to another relation database. Most simple (and most performance, IMHO) way is to make link between databases and write simple stored procedure. In this case we use minimal technologies and components, all features are "out of...

Architecturing method inheritance / hiding method in child class

java,oop,design-patterns,architecture
I am trying to write some Deterministic Finite Automaton related algorithms. So the obvious start is to define the entities: DFA, State and Edges. However, I though since the DFA is a kind of graph I should have basic classes Graph, Node and Edge each implementing IGraph, INode and IEdge....

NodeJS run code in X minutes architecture

node.js,mongodb,architecture,cron,queue
I want to schedule some code to be run at a variable time. For example, after 60 minutes I want to send an HTTP request to an endpoint and update a database document, but I also want to be able to cancel that code from being ran if an action...

Reference a property in another unrelated View Controller

ios,osx,cocoa,swift,architecture
I have a question regarding best practices for Cocoa application architecture. If you look at the screenshot of my app's storyboard there is a view controller in the bottom left (which many controls) and there are two view controllers with table views in a split view controller, on the right...

validate Username/Email REST endpoints HTTP method

rest,architecture
I'd like to add validate Username/Email valid/exists REST endpoints to my RESTful API. Right now I'm in doubt what HTTP method - GET or POST should I use for this functionality ?

Architecture for creating a JavaScript framework

javascript,architecture,frameworks
Around one year ago we started a web system that over the time has grown quite a bit. From the beginning the goal was to build reusable code that would speed up the development of future projects, and it has. With every new project, the reusable code from the previous...

Should I create another model for admins? Or what's the best way to do it in Ruby on Rails?

ruby-on-rails,database-design,architecture
I'm developing an app, which requires two types of users regular user and admin. Regular users have roles in the app, and an admin doesn't have any roles, he just should have an access to an admin panel. What's the best way to implement this task? ...

Java: Programming stations and the time it takes to move from 1 station to the other (need idea's) [closed]

java,data-structures,architecture
one of my classes of the program I'm making needs to hold a list of stations and also the time it takes to move from one station to another. My problem: I want to make sure I don't mess up the timings and want to link them in some way...

Libgdx: Objects creating other objects

java,android,architecture,libgdx
I have kind of a general question about a simple game architecture. In my game I have these classes: Main class who's responsible for drawing and rendering. Ball object which has a few attributes and update() function that does certain things. The main class has an array of all exist...

Mixing DAO and service calls

java,design,architecture
Let's say we have some layer above service layer, with web controllers for example. Service layer is in turn above DAO/Repo layer. In the upper layer the service calls are used alongside repo calls. It breaks the layering of the application to some extent, but should we really bother about...

Xcode 6 Error - “Missing Required Architecture i386” When Building for iOS Simulator

ios,architecture,frameworks,xcode6,i386
I have created a custom Objective-C framework. I would like to import it into any given iOS project and use its provided functionality on both the iOS Simulator and an actual device. To import the framework, I link it using the Build Phases > Link Binary With Libraries setting in...

Parameter validation vs property validation

validation,oop,architecture
Most (almost all?) validation frameworks are based on reading object's property value and checking if it obeys validation rules. Do we really need it? If we pass valid parameters into object's constructor, property setters and other methods, object seems to be perfectly valid, and property value checks are not needed!...

Why doesn't JavaScript get its own thread in common browsers?

javascript,browser,architecture,software-design
Not enough that JavaScript isn't multithreaded, apparently JavaScript doesn't even get its own but shares a thread with a load of other stuff. Even in most modern browsers JavaScript is typically in the same queue as painting, updating styles, and handling user actions. Why is that? From my experience an...

Consensus between DDD and Enterprise Architecture

architecture,domain-driven-design,enterprise,architectural-patterns
In literature (blogs, articles, books on Enterprise Architecture...), it seems there is a real (and exclusive) appliance of SOA in EA. If we consider DDD and SOA share common architecture principles but differ on many others, what is the place for DDD in the EA discipline ?

C# - would memory mapped files help me handle large amount of data without considerable performance degrade

c#-4.0,architecture,memory-mapped-files
The question is regarding memory mapped files - doest it help me achieve better write performance if I just have to keep appending data to memory mapped files when compared to writing a file to disk directly. My analytics application generates large amount of data which will then be aggregated...

What options are there for transferring one particular webapp user's data onto another DB instance without suffering PK collision?

sql-server,database,web-applications,architecture,uniqueidentifier
EDITED When we first architected our web app years ago, we chose auto-increment int for all of our users' data. However, we are now getting burned by how hard it is to transfer specific user's data (multiple tables with one-to-many relationships) to another non-empty database instance (with the same table...

Large scale and full extensable web application architecture

web,architecture,software-engineering,onion-architecture
I have been reading many architectures such as N-Layered, Onion ,... . But I'm designing a large system that is working by some huge databases and provides a lots of services to another applications/clients. On the other hand our system have to be designed very extensible. the parts of our...

How can I share a class library between multiple applications?

asp.net,dll,architecture
We have numerous small applications in our organization, most of them .NET web applications. Each of these has a seperate authorization system. I would like to create 1 library of functions to do authorization checks to use in all these applications. I would like to have this library centralized, so...

How to change architectures in static libraries?

ios,xcode,architecture,static-libraries,arm64
I have several framework statics libraries (.a files). When i call lip -info filename.a upon those files the terminal tells me that the architecture arm64 is not there. However to comply with the new Apple regulation stating that the apps must work with arm64 i need to add that architecture...

Segregating the read-only and read-write in Spring/J2EE Apps

mysql,jpa,design-patterns,architecture,spring-data
We using Spring, Spring-Data and JPA in our project. For production servers, we would like to setup database cluster such that all read queries are directed to one server and all write queries are directed to another server. This obviously will require some changes in the way the DAOs are...

Indirect Addressing Mode

architecture,mode,operand,addressing
I am currently trying to solve a problem where I am given these criteria: I believe that I have some of the answers correct but I am confused because the question mentions nothing about an address being stored at address 10 so how can indirect addressing even happen? Question: Where...

What does BEAM stand for in iex for the Elixir programming language?

architecture,elixir,acronym,beam,lightweight-processes
I'm sort of curious as to what the B. E. A. and M. stand for. I recall seeing an explanation of the acronym BEAM, but I have not managed to find it again. It comes up in error codes: ➜ gentoo iex Erlang/OTP 17 [erts-6.4.1] [source] [64-bit] [smp:8:8] [async-threads:10] [kernel-poll:false]...

How to propose web application demo with data to user?

angularjs,node.js,mongodb,architecture
I am working on a web application (interface with forms etc. - Server - db). I use AngularJS, NodeJS and MongoDB. The application is on the net but I still do not offer demo for users. I would offer them a login and password ("demo", "demo") or just a "Demo"...

With the MESI protocol, a write hit also stalls the processor, right?

caching,architecture,multiprocessing,vhdl,mesi
I'm doing a project that is to implement a dual-processor system with some kind of cache coherency (for which I chose MESI) in VHDL. I just want to confirm this one thing: a write-hit on a shared cache line should cause the cache controller to send invalidation messages on the...

Java generic class that contains an instance of implementation of generic interface

java,generics,interface,architecture
I am developing an independent, self contained component, that needs domain specific parts to function properly. The part of the idea is to create a generic interface, that will settle the usage of interface's implementation in another part of this component (in my example in class B). I have written...

How to scale a trie across multiple servers

architecture,system,scalability,distributed-computing,trie
Does anyone know how I might scale a Trie across multiple machines? Say the first machine runs out of space and I need to add more words from a very large dictionary, what might I do to add more words? (I am a Java thinker, but I believe the answer...

ASP.Net Architecture solution/suggestion

c#,asp.net,wcf,architecture,windows-services
We have 3 components as part of our application architecture; ASP.Net Web , WCF Service and Windows Service. ASP.Net web application calling a WCF to perform task. WCF intern triggers a running windows service to perform the task. Windows service intern opens multiple threads to perform the task. Windows service...

mips converting to assembly

architecture,mips
I was working with Writing MIPS assembly for the following statement: f = a - 20 + b + c - d using the following registers $1 a $2 b $3 c $4 d $5 f $6 g $7 i $8 j $9 A 10$ D my answer is this:...

simple model when requesting collection and extended model when requesting resource - how

rest,architecture,restful-architecture
I have the following URI: /articles/:id, where article is a resource on web-service and have associated model/class. Now I need to return only partial data for each resource (to save bandwidth and make for speed) when collection is requested, but when a single item is requested from collection I need...

Clojure Architecture like Uncle Bob did

architecture,clojure
I am trying to implement Clojure architecture like Uncle Bob did there http://blog.8thlight.com/uncle-bob/2012/08/13/the-clean-architecture.html and like he describe in clean code in Episode 07 - Architecture, Use Cases and High Level Design. Nothing in an inner circle can know anything at all about something in an outer circle. I want to...

Batch script not running

windows,batch-file,architecture,batch-processing
can you help me please? This piece of script is not running and i can't figure why. @echo off ver | findstr /i "5\.1\." if %ERRORLEVEL% EQU 0 ( set os_ver="xp" ) ver | findstr /i "6\.1\." > nul if %ERRORLEVEL% EQU 0 ( set os_ver="7" ) if %os_ver% ==...

Accessing a signal in both structural and behavioural architecture

architecture,signals,vhdl,counter
I have defined the structural architecture of a module e.g. architecture structural of my_entity is signal counter : integer := 0; begin MODULE port map(......count => counter.....); --this is an inout port end structural; I would like to implement a counter which is incremented based on a change in an...

architecture layering and unit of work pattern

architecture,repository-pattern,unit-of-work
I am trying to figure out a good practice to architecture / layering and unit of work. We use C#, write MVC front end apps. Normal structure at the moment is: MVC Service / Domain Layer Repository Layer EF6 MVC would simply call the service, (no logic here). The Service...

Where does ASP.NET Web API fit in terms of solution architecture?

asp.net,asp.net-web-api,architecture
Over the weekend I have taken a course on ASP.NET Web API but I am struggling to understand where does it fit in terms of usage. Did some google research but still confused. I can see it is good for implementing CURD operations on database but should I implement business...

WCF service architecture query

asp.net,architecture,wcfserviceclient
I have an application that consists of a web application, and mutliple windows services, only one windows service is installed depending on what version of the backend sofware is used. Currently, Data is saved by the web app in a database, then the relevant service is installed and this picks...

Error getting Ninject and WebApi v1 (MVC4) to work

asp.net-mvc-4,asp.net-web-api,architecture,dependency-injection,ninject
This is the error message I get: "Type 'GDMServices.Controllers.DmpeController' does not have a default constructor", I started going down this path as the answer appeared to work for a couple of users but I started getting errors that made me think something has changed and abandoned that solution. One of...

Get instances using runtime data in Simple Injector

c#,architecture,dependency-injection,inversion-of-control,simple-injector
I have an application which builds its user-interface based upon a user configuration in a database. I have created an interface called IAction which looks like this; public interface IAction { ActionType ActionType { get; } bool CanExecute { get; } void Configure(ActionConfigDto config); void Execute(); } An implementation such...

Difference between switch & bus architecture?

architecture,operating-system
I was just going through a operating systems textbook but I got stuck at switch architecture . Please explain what it is and how it is different from bus architecture ?...

How to handle MixedQuery with CQRS?

architecture,cqrs,event-sourcing
In properly deisgned application it might be that you can separate all requests to commands (that only update aggregates and return void) and queries (that extract data from specific read optimized model). But if you already have a heavy application and want to slowly move it to ES + CQRS...

Making a consistent API, what's less surprising?

design,architecture,language-agnostic
I have an API where there are property accessors like: int foo() Sometimes the properties can be "null". Since an int cannot be null, this is handled with a extra property to check null. bool hasFoo() What happens when people call foo() when it's null? Rather than have undefined behavior,...

C# Code design / Seperate classes for each TabControl

c#,oop,architecture,software-design,code-design
My main problem is that my tool grows and grows and I start loosing the focus on the different parts of my code. The main-Form got a docked tabControl at fullsize. I got 5 different tabs with for really different functions. So I can say my tool is splitted into...

Android application backend

android,architecture,cloud,backend,pull
I want to make an android application which will display an external message (For example: some quotes, proverbs etc) daily. The message should be retrieved from some place other than the client device and I would like to configure the messages from back end These messages should also change everyday....

MVC Web application architectural concern

c#,asp.net-mvc,web-applications,architecture
I have inherited an MVC application designed along the above project structure. the application uses the Unity framework for dependency injection, and the user interactions go upstream to the database in the following order View -> Controller -> ViewModels -> Repository Services -> ORM -> Database The infrastructure components...

How to model data for in-memory processing

java,performance,design,architecture,data-modeling
I have a lot of static data (i.e. read only data, which is not transactional) which gets updated only once in few days. I have to support searches on that data (api calls, not sql). So I am thinking I will just load it in Memory, and refresh the in-memory...

C#, Unity IoC: Registering and resolving generic interfaces, good practices

c#,generics,architecture,unity
I wrote generic interface and over time, I started using it quite often. I had also idea to actually provide another generic interface, extending existing one. Now, when I look into my Unity config (IoC framework is irrelevant here), it looks like this: container.RegisterType<IConfigProvider<ICountryConfig>, CountryConfigProvider>(); container.RegisterType<IConfigProvider<ILanguageConfig>, LanguageConfigProvider>(); // IEnumerableConfigProvider<T> :...