code wiki / (root) / nx_arch_research.nx

nx_arch_research.nx source

↩ module page · 44 lines · 3794 B

1// nx_arch_research.nx -- THIN structured SOFTWARE-ARCHITECTURE / LAYERING research source organ. COMPOSES 2// nx_research_engine (sovereign fetch->extract->bank). Operator 2026-06-29: "we dont want tight coupling we 3// want clear io, data, logic etc layers ... use nishi researcher and see how they are split normally." So: 4// ground a MEASURED layering refactor on REAL sourced practice (separation of concerns, three-tier 5// IO/logic/data, hexagonal ports-and-adapters, loose coupling/high cohesion, dependency inversion) -- never 6// assumptions (Rule 4). Banks clean .txt -> knowledge/library/ (nx_library_harvest_v2 indexes, nx_search_cli 7// queries). Canonical fact-dense static pages (sovereign TLS-1.3 fetch). expect_exit: 0 license_tier: ORIGINAL 8import "nx_research_engine.nx" 9const K_MAGIC_8388608: i64 = 8388608 10 11func main() -> i64 { 12 let store: *TrustStore = rf_init() 13 if (store as i64) == 0 { rf_puts("arch: trust store load failed\n" as *u8); return 1 } 14 rf_puts("CA roots="); rf_putn(trust_store_count(store)); rf_puts(" -- SOFTWARE-ARCHITECTURE / LAYERING research (IO/logic/data split, loose coupling) -> Library\n" as *u8) 15 let cap: i64 = K_MAGIC_8388608 16 let out: *u8 = sys_mmap(cap) 17 var ok: i64 = 0 18 19 rf_section("LAYERING -- separation of concerns, three-tier (presentation/logic/data), abstraction layers" as *u8) 20 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Separation_of_concerns" as *u8, "arch_separation_of_concerns" as *u8, store, out, cap) 21 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Multitier_architecture" as *u8, "arch_multitier" as *u8, store, out, cap) 22 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Abstraction_layer" as *u8, "arch_abstraction_layer" as *u8, store, out, cap) 23 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Software_architecture" as *u8, "arch_software_architecture" as *u8, store, out, cap) 24 25 rf_section("BOUNDARIES -- hexagonal ports-and-adapters, dependency inversion, inversion of control" as *u8) 26 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Hexagonal_architecture_(software)" as *u8, "arch_hexagonal" as *u8, store, out, cap) 27 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Dependency_inversion_principle" as *u8, "arch_dependency_inversion" as *u8, store, out, cap) 28 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Inversion_of_control" as *u8, "arch_inversion_of_control" as *u8, store, out, cap) 29 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Single_responsibility_principle" as *u8, "arch_single_responsibility" as *u8, store, out, cap) 30 31 rf_section("COUPLING -- loose coupling, high cohesion, the operator's exact concern" as *u8) 32 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Coupling_(computer_programming)" as *u8, "arch_coupling" as *u8, store, out, cap) 33 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Cohesion_(computer_science)" as *u8, "arch_cohesion" as *u8, store, out, cap) 34 35 rf_section("DECOMPOSITION -- DDD, microservices, SOA, MVC" as *u8) 36 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Domain-driven_design" as *u8, "arch_ddd" as *u8, store, out, cap) 37 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Microservices" as *u8, "arch_microservices" as *u8, store, out, cap) 38 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Service-oriented_architecture" as *u8, "arch_soa" as *u8, store, out, cap) 39 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Model-view-controller" as *u8, "arch_mvc" as *u8, store, out, cap) 40 41 rf_puts("ARCH BANKED: "); rf_putn(ok); rf_puts(" / 14 (sections preserved, gzip-guarded; run nx_library_harvest_v2 to index, nx_search_cli to query)\n" as *u8) 42 if ok < 1 { return 51 } 43 return 0 44}