Abstract
This article discusses a new concept that may help professionals and specialists read the “urban code” of Middle Eastern traditional contexts that was developed from the mix of social aspect and spatial morphology, illustrating how these elements are interconnected in a way that highlights the values and qualities and their reflections on the physicality of the city. This urban code envisions and analyses the relevance of the social pattern language of the traditional context to its urban manifestation, leaning on the “edge environment” as a new generative concept. It outlines the relationship between the ideologies buried underneath the walls of the spatial form of traditional built environment such as Cairo and sheds light on those ideologies in a way that helps us read them within the context of modern values pertained to the sense of community. The notion of the edge environment may contribute to design education restoration, preservation, and upgrading processes as design toolkit that employs careful interventions by fine-tuning the edge environment.
Keywords
Introduction
Traditional Middle Eastern contexts, particularly in North Africa, have lost much of the diversity that advocates the vibrancy their spaces. The livability and diversity of these contexts are being substituted by different types of modern urban commercial developments. Put it another way, the lasting success of socially responsive spaces of historic urban contexts of Middle Eastern cities created unprecedented “work-and-live” concept throughout many historical eras standing in contrast to many modern developments. The central argument of this article is that this sustainable traditional urban fabric in many ways constitutes a physical expression of the values that were crafted to protect the sense of community through social interaction between the inhabitants. The cohesive modality and style of life of traditional built environment carry beneath its social structure the responsive codes of social networking, communications, and perceptible environmental values that sustain the qualities of traditional societies and are still able to feedback modern human community (Bianca, 2004).
This article aims to examine the key rules that fuel this explicit aspect of sustainability, investigating in depth the mutual relationships between conventionalism and spatial organization by analyzing the urban morphology of Middle Eastern traditional cores. It has been argued that when city planners and urban designers separate the physical dimensions and the values and ideologies behind, this separation can adversely impact the social relevance of the spatial morphology of the historic cores of the city (Akbar, 1995), whereas unifying the physical dimensions of spaces and the ideologies embedded beneath this physicality leads to a collective contributory feeling of individuals and self-governing communities maintaining the equilibrium and stability between top-down and bottom-up decision-making mechanisms within historic contexts. Sketching out the responsive urban code helps researchers address an explicit evidence that the balance between top-down and bottom-up decision-making in historic sites is a key component of the social and environmental responsiveness of these sites.
The article will address how the application of this coherent urban code is regulated and how it manages the edges of spatial morphology, the interface between the built form and the public domain, through vibrant social pattern language among the inhabitants. In this context, the central question we need to ask is that “what is the cohesive social pattern language of these historic layouts, and how did it create these successfully responsive environments?”
The key to answering this question lies in exploring the reasons encoded behind this apparent success through careful reading of the robust bond between traditions, mores, and principles and the morphology of the busiest sites of the old cities. This article is therefore structured in three parts: first, developing a provisional unified working model for reading the social pattern, or the urban code, of the historic layouts; second, the application of this working model to illustrate the aspects of social sustainability through two in-depth case studies of two sites in historic Cairo; third, the article summarizes and concludes the significance of the concept of the edge environment as a key regulator of this urban code via fine-tuning of the edges of spaces.
The Creative Tension Between the Inhabitants and the Unified Framework Governing the Code of the Built Form
Reading the urban code in the traditional built form is central to grasp the mechanism of the social pattern language, in particular the mechanisms of ownership, usage pattern, maintenance, and management of public and private properties by local people. This aspect of such mechanisms relies on the interplay between the static and active occupants of buildings and spaces. In this context, the static occupants mean architectural interventions that are represented in the walls of space, whereas the active occupants reflect any light structure added by people to their shops and fore-spaces and various social interactions among residents, passers-by, and peddlers. These transactions created dialogue and then transformed into a socially responsive pattern.
From the analysis of the mediaeval treatises of master masons, it has been observed that the continuity of socially responsive pattern language that is, in turn, developed into unique building regulations or code relies on the role of human agency (Hakim, 2008). Its acts can be observed at the edges of traditional built form, the most expressive areas that reflect the social interaction. In three sequential phases, human agency reshaped social interactions into urban regulations as follows: First, the building and urban conventions that regulated the traditional built environment were emanated from believes, traditions, and customs that developed into accumulative and interconnected entities (Mehaffy, 2016), in a form of building patterns. These patterns were developed in two sequential stages: addressing the inhabitants’ needs and conceptualizing the responses to these needs in generalized building rules (Akbar, 1995). Second, these patterns were used repeatedly because of their accumulative and adaptable characteristics, embodying the flexibility as prospective building regulations (Lindley, Handley, McEvoy, Peet, & Theuray, 2007). Third, there was an order governed these patterns. They were operationalized in two phases of the harmonic building processes: the top-down phase, which sets out the rhythm of larger urban blocks that were constructed on monumental scales such as public buildings and great mosques around the two banks of thoroughfares, mostly on the western side. These are conceptualized by this research as the larger urban grains and then the in-fill between these large grains, conceptualized as the smaller urban grains such as houses for local people, or bottom-up phase. In these two phases, reflections of the influence of human agency on the urban form can be seen. This reflection is observed through the vibrancy of city’s quarters and explicitness of its visual environment and at the level of people’s involvement and collaboration (Khoshnaw, 2013). Therefore, the traditional urban form is regarded as a product of responsibility shared by its inhabitants.
Components of Human Agency
Two main urban characteristics distinguished the traditional urban form: uniqueness and diversity (Hakim, 2007). In this context, uniqueness can be seen at the macro-level of spatial urban morphology, or the large urban grain resulted from top-down processes and acted as the major guidelines of the urban language of Middle Eastern traditional centers, whereas the great diversity can be noticed at the micro-level of spatial form, smaller urban grains, of each historic site, emerged from conventionalism of the community that is generated through bottom-up processes (Hakim, 2007). Put it another way, these characteristics provided a diversity of accents within the same grammar or language. The diversity of this pattern language was developed by the interplay between bottom-up building conventions or unwritten laws and agreements which were based on the responsibility distribution known as shared responsibility of the inhabitants. These two components, building conventions and shared responsibility, are viewed as a product of the reciprocal relations generated between, on one hand, architectural and urban forms and, on the other hand, the ideologies that lie beneath these forms. By adding the ideological dimension to the physicality of city, the social pattern functioned as a “building act” or “code.” Accordingly, it has been argued that the social pattern, which is considered the key structure of the urban code, maintained its linguistic metaphor through these two components.
The conventions, unwritten laws
The conventions developed through a generative process that materialized ideologies as aesthetically active bottom-up creative tension process. This creative tension can be sensed in the traditional built environment through two levels of communication and social interaction: networking and feedback, positive or negative (Hakim, 2008). Networking was a key player responsible for maintaining the social interaction and, in turn, the dialogue among residents. The repetition of good examples that had been initiated by local people through bottom-up processes generated positive feedback. This generative process had been monitored and supervised by authorities having jurisdiction through top-down processes to settle any disputes between neighbors. The key role of this top-down supervision is to prevent negative feedback in case of undesirable or harmful acts.
These conventions were based on proscriptive rules addressing only “what must not be done,” conferring people greater freedom in what they did do. These conventions contradict with the prescriptive centralized building acts and regulations of the contemporary urban development that aim to control every single act that may be added or removed by users. These conventions, therefore, created and enriched social interaction by encouraging local people to engage in dialogue. As a language depending on feedback and networking, this pattern had a significant self-healing and iterative aspects by correcting mistakes, disseminating harmless solutions which were seen as valid, agreeable cases and excluding disputed ones. Examination of this social pattern language highlights the two levels of interaction—feedback and networking—and the three phases through which these two levels were operationalized—emerging or expressing values, tactical, and aesthetic phases (Figure 1; Mohammed & Thwaites, 2011).

Developmental process of building conventions.
In the first phase, solution was initiated and proposed by people to meet their specific need which encompassed cultural, religious, and political values. Second, the solution proposed in the first phase was developed and fine-tuned to form an optimum valid tested solution and then used as an ideal example. Once this solution is recognized as an ideal example, it is then generalized and functions as a pattern. This tactic gives this phase, and in turn the whole process, its prospective and sustainable aspect. Third, a pattern that achieves definite success in the tactical phase becomes a legitimate building act that can be applied as a general principle known as a convention (Urf) (Hakim, 2008). This (Urf) is articulated in more detailed executive building conventions used throughout daily life. This phase adds the aesthetic aspect and the sense of community (Talen, 2006) to the whole process as it produces an iterative, self-healing distinguishing architectural and urban character.
Types of traditional agreements or contracts—responsibility models
These conventions worked through different types of agreements that were centered around a mechanism of responsibility distribution among the inhabitants. Shared responsibility contributed to shift the way that traditional built environment was viewed and analyzed. It assisted researchers to understand the accumulative look of old urban fabric of the city as a process rather than as a product. Its core concept maintains the perfect distribution of the claims and obligations that lie beneath the three rights: ownership, use, and control, among all partners in the built environment (Zhao & Siu, 2014). Therefore, there were different roles based on the role which every party was playing: as an owner, user, controller or manager or both, through the mechanism of responsibility distribution conceptualizing the idea shared responsibility. A careful reading of responsibility distribution, or shared responsibility, thus gives contemporary professionals a better insight and understanding of the governing code of the urban fabric in a way that is logical and foreseeable (Habraken, 1998). In some cases, a single party might have the right to all three claims, which is known as a unified agreement of responsibility model; one party uses, controls, and owns. Another example in commercial areas is the rental agreement between two parties—the owners and the shop occupiers—in which the second party was allowed to use only the interior space without owning or controlling, meaning that it was not permitted to change the interior or the exterior walls without previous consent from the authority or the shop owners which is known as the permissive responsibility model. Similar to this case in modern times but with a different use is the user in a hotel. In this case, the user has the right to use the room but not to control or own any piece of furniture or the wall (Habraken, 1998). Another example is vendors in marketplaces or at the front of public buildings who could only control and use their places without actually owning them, which is known as the possessive agreement of responsibility model. The vendors did not have the right of addition or removal. For example, they were not allowed to add or remove a deck or an awning to their possessed places but simply they could manage the edges of the space.
Occasionally, the removal or addition to any property was sometimes distributed among three parties: one party owning, the second using, and the third controlling the space. This distribution is known as the scattered or dispersed agreement of responsibility model. The best example reflects this dispersed agreement is the building that was assigned for public services. This type of buildings was owned by a central authority and was known as ‘Waqf endowment institution.
These various models of agreements or responsibility distribution resolved the tension between bottom-up and top-down decisions by filling the gap between the two decisions and maintained stability and the power distribution within the traditional built environment. Moreover, they helped determine when top-down interventions should gradually give way to allow bottom-up or self-organizational processes to take hold. This created kind of balance that sketched out the indefinite zone between two main areas of expressions: building expression, in which there is no activity outside the building line, and territorial expression, in which activities dominate the fore-space of buildings.
Core Principle of the Socioenvironmental Sustainability of the Traditional Built Environment
Preventing acts that were hazardous to others, to the environment, or to the actors themselves was the role of human agency in the traditional city. This role could take various forms based on different societal priorities: environmental, social, or economical. This approach relied on the teachings of Prophet Muhammad (PBUH) dating back to 650 AD, his authentic “hadith,” known as the principle of “causing no harm.” This principle, which is still in use and effect, is calling for causing no harm by preventing harmful action to anyone including inhabitants, visitors, users, passers-by, or to the environment itself (AI-Nawaawi introduced by Zarabozo, 1999). This principle was considered the basis of “building act” because it was entrenched in all buildings’ bylaws generating conventions that had organized the built environment all over the Middle Eastern cites. It promoted the sense of community by delineating the roles of local people toward each other and toward their built form. More importantly, it was relevant to the way that the coherent social pattern of the traditional built environment was operationalized (Talen, 2006). The level of harm that might occur to individuals was the factor that assisted to draw the limits of the undetermined zone between the two expressions of the built environment: territorial and building; thus, this principle fuelled sustainability aspects of the community by empowering a sense of belonging of the community members.
The idea of traditional community as a single entity was, therefore, the foundation of this code-like social pattern because it was able to mitigate the effect of any potential harm or risk to its members. It has been conceptualized as a community-based customary rule system (Hakim & Ahmed, 2006; Olwig, 2005, 2007) that represents the essence of the bottom-up process. It works through the idea of the collective response of community against any undesirable act by individuals or groups (Lindley et al., 2007; Roselló, Martinez, & Navarro, 2009). Various modern concepts have been developed relying on the idea of controlling undesirable acts and encouraging the collective feeling of management and control of harmful actions, social vulnerability, adaptability and the sense of community. On this basis, cessation and stoppage harmful actions in traditional quarters and neighborhoods can be perceived on two levels, public and semipublic.
The public level: The strategy of responsible freedom
Control and management of public spaces is the best explicit concept that reflects the idea of “preventing harm.” Its central principle is to monitor and cease harmful activities and motivate desirable ones. This can be understood from the perspective of “responsible freedom” which was in effect in public spaces and noticeable by allowing the residences of these societies to exercise their desired acts (Carmona, Heath, Oc, & Tiesdell, 2010), taking into consideration that public space is a “shared space” (Carr, Francis, Rivilin, & Stone, 1992). This growing feeling of “shared space” among the community members generated a broad consensus regarding what was permissible or tolerable (Lynch & Carr, 1979). As a result, various unwritten rules or regulations evolved.
This approach of responsible freedom reshaped functional and cognitive cues increasing the desirable acts and better behavior in public domains by enhancing the feeling of ownership, active engagement, and public participation and shared responsibility of community members (Carmona et al., 2010). The well-designed urban forms such as streets, sidewalks, and other public spaces brought out the best in human nature by promoting the feeling of “shared responsibility, reinforcing the ‘responsible freedom” and maintaining liveliness and vibrancy of this environment as products of this well-designed public domain.
The semipublic level: Self-policing communities
The traditional city was best represented and exemplified by the structure of the gated communities which embodied the idea of “polis” or self-governing political and shared places. This idea was explicit in case of threat or where there might be a risk of crime or dangerous strangers. So that the role of these gated areas was not only to maintain the security of the quarter against any threat from intruders but also to act like shield or guard of the community from danger from within (Grant & Mittelsteadt, 2004; Jacobs, 1961). These shared places were a kind of restricted context that was more livable, secured and controlled by both central authorities and the people who share the place (Newman, 1996). In this context, Mohammed and Mahmoud (2012), in their discussion, define the self-governing communities as The residents had the power to control and to manage their environment, the basis of the bottom -up process in such societies expressing this control architecturally through the hierarchy of spaces. This hierarchy was achieved by dividing the quarter into sub-quarters by building gateways all way through the quarter in hierarchical manner. (p. 231)
Based on this hierarchy, ethnically specialized quarters were the main demographic aspect that governed these self-governing cells in traditional built environment; each quarter was run by its own chief, named Sheikh head of the quarter in a way similar to that of modern municipal government (May, 2010; Saoud, 2002). The community-based customary rules, initiated bottom-up, were the regulators of these quarters, which conceptualized in an urban code. The core of this code is the principle of “no harm” which generated two central rules: including social vulnerability to risk and monitoring public participation (Fedeski & Gwilliam, 2007).
Consequentially, the Middle Eastern urban context, particularly in North Africa, was operationalized by an urban code-like social pattern language that was generated by the ideologies, qualities, and values that were buried beneath the physicality of the built environment which combined three components: core idea, theme, and tools (Figure 2). Conventions and communal responsibility models among the inhabitants, the two pillars of human agency, are the tools. The principle of “no harm” is the core idea and pertained to this code-like social pattern. The balance between the decisions imposed top-down and building regulations initiated bottom-up is the main theme, the mechanism, through which the tools were operationalized. Altogether, this pattern language, or urban code, organized and regulated the traditional built environment in a way made it, not only socially but also environmentally responsive.

Social pattern language framework.
Reading the Urban Code Through Case Studies
Two sites in mediaeval Cairo have been selected as case studies to help the process of reading the social pattern language: the spaces of Been El-Qasreen, at the central point of the main thoroughfare, and El-Sokaria and Bab-Zewila, the gateway to the traditional city (Figure 3). These sites are considered the most reflective cases of urban contexts of historic Cairo as they represent a mixture of cultural layers accumulated throughout medieval times (Jayyusi, Holod, Petruccioli, & Raymond, 2008). The overlap of the historic layers of these sites, therefore, reveals a long history of urban development in addition to continuous social and environmental interactions throughout time and place. They present explicit examples of a traditional architectural and urban culture of diversity, uniqueness, and uniformity. More importantly, these sites are distinguished from the surrounding contexts because of the clear social boundaries they drew around themselves maintaining their aspects of medieval social life (AISayyad, 2011; Denscombe, 1998).

The two sites of case studies in old Cairo: (a) space of Been El-Qasreen and (b) space of El-Sokaria and Bab-Zewila.
The case studies play a significant role by illustrating the social pattern as an urban language of these historic contexts that developed over time into an unwritten urban code enforced by all community members. These two case studies witnessed a high level of competition among the upper-class people for the purpose of land possession and property ownership. As a result, the balance between the bottom-up and top-down processes is evident at the edges of the urban spaces of these sites. Therefore, they are well illustrated examples of the balance between the two decision-making processes and give better understanding and insight of the “edge environment” as a key concept and design tool maintaining social interaction in traditional built environment.
More importantly, observational graphical analysis will be used as a technique to examine these two cases. This technique is an analytical method used in documenting historic sites (AI-Kodmany, 2001). This analysis is performed through freehand sketching that provides a better understanding by depicting and documenting the evolution of the sites in the past, in the present, and in a suggested future, so that they can be used to help observe aspects of social sustainability of such sites. This approach helps researchers, city planners, and urban designers who are interested in historic sites recapture the image of the traditional cities and convert documented data from the survey and observation into real visual image by developing a concept of environmental preservation strategies.
This method promotes visual analysis allowing a careful investigation of the various historic layers of the spatial morphology. It analyses changes and their implications on the spatial organization, focusing particularly on the edges and walls of space. This analysis has been done through several stages. The first one is the careful reading and examination of the social interactions that occurred within the space to allocate the position of territories and the quality of the space. The second one is sketching out the development of building processes and the hazardous acts caused by narrowing the space or converting it into thoroughfares. The third one is observing the fluctuations of building lines. The fourth one is reconstructing and analyzing the social aspects of open spaces, including passive and active engagements with the environment, and the fifth is visually recording whether the additions or removals were initiated by the people, bottom-up, or by the authorities, top-down (Tufte, 2001). This method supports the observational part of this article to intensify our knowledge and experience of the case study sites.
The Working Models of the Social Pattern Language
Reading the social pattern language of these sites requires careful examination of the creative tension generated among all the inhabitants. Reading this tension provides better insight into the urban code that regulated this traditional built form because it is the generator of all unwritten rules, instructions, and acts. In other words, it is the main source of traditional “bylaws” for the built form. This reading will be through the careful examination of these cases in particular, by studying the mechanism of the reciprocal relation among the local people, exemplified in the active occupants of the space, and their physical surroundings, represented in the static occupants of space.
Most of these mutual relationships occurred through the dialogue and social interaction among the inhabitants, for example, conversations, disputes, negotiations, networks, and collective solutions, which illustrates the reasoning behind envisioning this social pattern as an urban language. Studying this tension has shown that it is responsible for generating several aspects of social sustainability that are accumulated at the edges of the spaces (Figure 4). Accordingly, the key concept of the edge environment has emerged from the study of this tension, giving us better understanding of the generative processes of active engagement between people and their traditional built environment and responsibility distribution among the different parties. The governing theme that can be used to describe these two case studies is that “spaces are squeezed like narrow streets to link, not spacious areas to live in” (Mohammed & Mahmoud, 2012). The philosophy behind this theme is that the priority was always given to the private domain over the public one. In these cases, the edge environment is explicit in the change of “no man’s land” and fore-spaces from public domain into private spaces; thus, the concept of edge environment can be viewed as a corner stone of the traditional built form (Meyer, 2001).

Framework of urban code of historic layouts of Middle Eastern Cities.
The inhabitants of these traditional communities explored and fine-tuned their own solutions to fulfill their social and environmental needs. They worked at a local level toward shared power and participation which establish the foundations of responsive community socially and environmentally. A robust relationship between inhabitants and their physical built form was evolved over time from shared culture and belief, collective feelings of liability toward their environment, and respect for the roles of individuals and groups. People had the right to act freely with limited intervention from a central authority. Accordingly, the collective feeling responsibility of residents that they should maintain and protect their environmental resources and social structures against any prospect hazard was a governing feeling of people of those societies. This collective feeling is viewed by many scholars, such as Talen (2006) as the core idea of sense of community, which is regarded the key stone of shared responsibility and responsive community. It is apparent in these sites in public participation, shared ownership of places, and more importantly the right of investment of local environment given to local people by central authority.
Reading the creative tension: The mechanism of decision-making in the building process
At the scale of the space as a whole, the good behavior and attitude of individuals and smaller groups of local community to be involved in a dialogue and conversation with the elite or central authorities is the central motivation of the feeling of the sense of community. The ability to communicate with each other is the generative mechanism of decision-making between bottom-up and the top-down processes. In first case study, this sense of community is best exemplified, where the top-down decision-making was concerned with delivering large-scale architectural and urban infrastructure, such as large complex buildings. The bottom-up decision-making had more to do with issues related to smaller urban grain buildings and to the way these buildings were operated, used, maintained, and managed. This mechanism of decision-making created this balance in this space which was reflected in the progression of building process of monumental complexes on the western side of the street; thus, the urban blocks enlarged on this side more than those on the eastern side, creating a kind of environmental preference and more coherent and guiding visual image in a way that made it easier to read (Kaplan & Kaplan, 1982).
At a detailed lower scale of urban form, this social urban language is not explicit, so its elements must be studied independently, in orderly fashion, one at a time. Therefore, a need to develop an anatomizing method was essential and appropriate for the purpose. The anatomizing method will assist exploring the core relation between the physicality of the built environment and its social life. The key roles of this method are anatomical and analytical of historic urban contexts. This method is operationalized through two working models, ideological and physical relying on the conventions and responsibility forms as analytical tools. The significance of this method was, therefore, to dissect stratify the spatial urban morphology into separate spatial layers, lower and upper, each with its activities, structure, own people, and spatial qualities that distinguish it from the other.
Mutual relations and the concept of the edge environment
Such anatomizing analysis indicates that this socially responsive pattern created a balance that controlled each spatial layer independently. This balance was operationalized through the mutual relationships between the inhabitants and their built environment, characterizing spatial stratification and the relationship between the static and active occupants of the spatial urban morphology. The most explicit dynamic forms of mutual relations were evolved around the edges of the space. These different forms of mutual relationships enriched the sense of community, for example, sociocultural, religious, and economic mutual relationships. Each of these examples has been illustrated in each case study emphasizing that the locus of bottom-up decision-making can be envisioned at the edges of space which are the place of social interaction.
Arguably, all social transactions, such as agreements, disagreement, disputes, and co-operation between vendors, passers-by, and shop occupiers, and any building actions, such as additions or removals, in marketplaces or traditional open space can be conceptualized as one of the previous forms of mutual relations that took place around the edges of the space. For example, the interactive dynamic mutual relationship was emerged as a result of all built-in decks, overhead awnings, and vendors’ locations which were added to the edges particularly attached to the edges of large complexes. In traditional residential neighborhoods, this could be observed in the collective feeling of belonging and ownership of the community members that urged them to collectively manage, maintain, use, control, and utilize the fore-spaces abutting houses. The development of the dead land, known as “no man’s land,” beside the old city walls into marketplaces is another example of these relations. In this context, the dead wall means solid masonry wall with no openings at the ground level. This relation can be observed in the second case study, the space of Bab-Zewila (Figure 5).

Reciprocal relations developed “no man’s land” abutting Bab-Zewila into busy commercial areas, bringing life to these abundant edges.
Therefore, it can be argued that aspects of a social sustainability of built environment are visible at the walls around open space in general, or spatial edges in particular. The edges of spaces, therefore, mirror the life of a place in terms of its identity, character, attachment, and ideology (Kim & Kaplan, 2004). On this basis, the edges of spaces contribute significantly to the design educational process as they reflect the most usable areas of spatial forms. This usability has been sketched out graphically in the second case study at the edges of El-Sokaria. The edges of spaces were transformed into interactive dynamic edges based on sociocultural and commercial mutual relations (Figure 6). These mutual relations fall mostly within the area of possessive model of responsibility. In addition, the spaces that developed this type of edge were controlled and regulated by two rules initiated by people, bottom-up, on the basis of the core principle of causing no harm: The priority is for the passers-by to use the center of a space, not to the vendors “ activities or buildings” encroachments, and they have a right to object to any undesirable act in the passageway (Zhao & Siu, 2014). These two rules evolved into conventions that organized these edges physically, such as right of way, right of height, right to use fore-space, easement right, and the right of neighbors (Hakim, 2017). Moreover, each of these edges was governed by group of Sufi and Islamic jurisdiction.

(a) From 1412 to 1422, the complex was subjected to shared responsibility model, permissive, and right of control was for the founder, the king; (b) from 1422 onward, the shop occupiers started to share the right of control with the owners; (c) the temporary structure, extension, transformed into permanent ones and the tenants eventually owned their shops, the shop occupiers became shop owners.
Therefore, the most prevalent form of edges is that one developed from the commercial mutual relation (Mohammed & Mahmoud, 2012). This type can be seen and sensed in front of commercial buildings and it has been observed in the second case study, at the walls of Sabil Frag lbn Brquque. These spaces show this type of active edges in which each commercial, mixed-use ground floor building, shop-like, has a strong visual and functional extension to the street through wide opening to the space. This wide opening equipped with a deck in front of the shop on which the occupier sits to carry out his or her commercial bargaining and transactions. Thus, it generated an active engagement with the space; this is unlike the passive engagement of a modern shop that is generated by the wide glass windows. Moreover, in the traditional shops, it is permitted for a customer to transact business with whomever or whatever is inside the shop. Meanwhile, the customer is still maintaining his or her presence in the space (Mehaffy, 2016).
The goods or any other products of these shops displayed in a way that pressed out into the space increased this consciousness of interactive relation because the passers-by found themselves in the middle of quantities of goods which encroached on the space outside the shop squeezing the thoroughfare (Figure 7). On this basis, there was a transformed mutual relation resulted from this interaction with the edges of the space. These interactive movable edges were organized and controlled by the principle of “no harm” through detailed set of executive conventions, for example, right of access, right of objection of passers-by, and right of way (Hakim, 2007).

All the conversations, negotiations, agreements, disagreements, and interactions take place at the edges of commercial spaces generating interactive movable edges.
The religious and sociocultural mutual relations are another type of interactive edge that can be observed in the first case study, the space of Been El-Qasreen. The conventions governing these types of edges concerned with creating reciprocal relationship between the static and active occupants of space. Put it another way, it is a relation between walls of spaces and passers-by. This reciprocal relation is apparent in the responsibility model distribution that is conceptualized as the dispersed agreement of responsibility (Akbar, 1995), in which three parties dispute and claim three different rights; one party owns, the second manages, and the third uses. This model regulated the endowment system, which means assigning some buildings for religious and social charitable purposes by the elite. This system supported the higher class people to gain public acceptance; in turn, this acceptance was essential to empower their authority politically and religiously.
These religious, sociocultural reciprocal relations developed edges that might be envisioned as the most active and dynamic spots within the public space. One of the best illustrated examples of this interactive edge is observed between public space and the walls of mausoleum. The core idea that shaped this type of edges is “window sitting reciter,” the convention that developed from Sufi’s teachings and was considered the most popular social patterns of daily life of the traditional city. The idea of this convention started as an expression of the continuing power of the royal family by building a mausoleum of the deceased king abutting the street and attached to his previously built complex. According to the mausoleum traditional design requirements, the tomb should have a full exposure to the space by projecting the main wall out from the building line. This was to create a mutual relationship between users of the space and the deceased person in the tomb, in this case the King El-Saleh Ayyub. This relationship was recorded and observed at the mausoleum’s projected walls and windows. The core of this reciprocal relationship centered on the Quran reader, called the reciter, a man who was assigned to sit in the tomb’s window every day to recite the holy Quran, attracting passers-by attention. Because hearing the holy Quran is one of the greatest benefits according to Islamic ideology, the passers-by gathered around the window of the mausoleum generating an interactive mutual relationship between the passers-by and the tomb occupier. The passers-by got advantage by hearing Quran recitation that was transmitting from the tomb’s windows, so they would pay respect, pray, supplicate, and ask forgiveness for the venerated tomb occupant. Therefore, the tomb had to be in an imposing position along the passageway (Figure 8).

The edges developed from religious reciprocal relation between the mausoleum and the passers-by.
At the edges of various Sabil buildings (water house) of this space, the sociocultural relation edge can be sensed and observed but in different form. These buildings are another type of endowment in which three parties share the responsibility model: the first owns, the second controls, and the third uses. These buildings were used as drinking-water fountains inside the space. The idea of such charitable buildings is to provide water for the passers-by and the poor who cannot afford cistern in their homes; thus, it was a devout behavior for the elite to offer free drinking water through endowment of such places (Antoniou, 1998).
In these buildings, in particular the elaborated openings at the large round corners on the ground floors, a sociocultural mutual relation around their edges was generated. As many people gathered to obtain and drink water from taps that emerged from the windows, they would wish and pray for the good health of the founder of this charitable Sabil building, the endowment. Therefore, as a design requirement for the Sabil, the openings should be designed in a way that they be exposed to the greatest numbers of the passers-by; accordingly, the windows of the Sabil were projected into the space of Been El-Qasreen without straddling the passageway. The governing convention of these buildings was that “the centre of a space belongs to passers-by, not to buildings” (Figure 9a). Therefore, the main exterior walls of such buildings were built rounded, curved, or projected beyond the building line in a way that they had a full exposure into the space; as a result, the dynamic shape of the building line arose. The reciprocal relationship was further enforced by extensively elaborated friezes delivering spiritual messages. As the users of the space stop by to drink, they contemplated these elaborated friezes so that the mode of spatial experimental changed from walking to a complete halt. On the upper floor, public services were also provided where there was a kuttab, a traditional school, whose children and orphans of the neighborhood were adopted and taught how to memorize the holy Quran (Figure 9b).

(a) shows the the projection of Sabil Building into the space squizing and narrowing the thoroughfare and (b) The Sabil, as an example of endowment building, was subjected to the dispersed responsibility agreement and built exposed to the street and passers-by creating a sociocultural mutual relation edge.
The edge environment as a generative concept of the sense of community
In these two cases, the various forms of mutual relation-based edges successfully created a sense of human community that can be observed in all community members’ attitudes and behaviors toward their built environment (Fisher et al., 2002), because their environment allowed them to invest by giving them the right to act freely and establish their own vending business at its edges (Lang & Moleski, 2010). This situation generated a higher level of dynamism in the community and was a crucial factor enhancing the feeling of loyalty and the feeling of belonging toward the environment that was the main component of the sense of community (Talen, 2006). It was responsible for developing two unprecedented characters at different urban scales: diversity at the micro-level, or the in-fill of the urban form, and unity at the macro-level, or the large institutional buildings of the urban form. This dynamism was evident in the community members’ dialogues, negotiations, debates, and sometimes disputes regarding any harmful act or risk. It is explicit in front of the El-Saleh Ayyub complex in the space of Been El-Qasreen, the first case study. It can be observed in the active relationship between the territorial expression and building expression, because the vacant land was offered through unwritten agreement by the authority to local people to use and invest; then, it was transformed over time into a marketplace and then into built-in shops (Figure 10; Mohammed & Thwites, 2011).

The change in responsibility models, the first case study, in front of El-Saleh Ayyub complex: (a) vendors and peddlers—dispersed model of responsibility; (b) shop occupiers—marketplace, light structure additions, possessive/permissive model of responsibility; (c) shop owners—built-in additions, unified model of responsibility; (d) territorial expression dominated the space more than building expression.
In addition, the self-governing communities in the second case study is explicitly reflected on the collective feeling of belonging, the key component of gated communities, which is the ideal example of the shared places of this case. The social pattern language and the growing feeling of the sense of community can be observed in the communication among the inhabitants of these gated communities, known as community networking. This networking was responsible for discussing, filtering, and reviewing building and behavioral acts and decisions related to the built environment (Adrian et al., 2002). These acts and decisions, which might be negative or positive, generated building set of unwritten laws and rules conventions. The building acts that were related to the use of the fore-spaces (fina’) and the commercial activities added to the immediate edges attached to houses were reviewed. Moreover, the behavioral acts projecting shared responsibility such as protecting and maintaining shared spaces and fore-spaces were encouraged and supported. The dissemination of these kinds of communication, networks, and conventions in traditional built environments generated communal consciousness that harmful acts or behaviors should be avoided. This supported and enhanced a positive social interaction of these societies.
The feeling of neighborhood was materialized through these networks which played a role as a signifier of the social pattern language (Jacobs, 1961; Kim, 2001; Talen, 2006). Communication, conversation, negotiation, and the collective feeling of belonging among the inhabitant were also apparent in one of the conventions that regulated mixed-use pattern, “work and live,” in these gated communities, in particular workshops on the ground floor, and they are, therefore, regarded as key evidence of the sense of community. The best illustrated example of these conventions that organized the edges between two adjacent neighbors and the territorial limits between them was the right of neighbor (Mohammed & Mahmoud, 2012), which prevented the shop occupier from transcending into or using the neighbors’ territory. This can be seen as a proof and evidence of the success of shared responsibility and the sense of neighborhood or casual acquaintances (Nasar & Julian, 1995).
As a result of this growing sense of community of the traditional built environment, two main aspects arose that showed the robust relation among all local residents and were the main reasons for the social and economic stability of these self-governing communities: the right of investment that the environment permitted to the community members, known as the environment of opportunity and the sense of ownership that generated the collective feeling of management of the built environment.
These communities were founded on the concept of mixed-use, work and live, commercial and residential buildings. Creating opportunities for local people was one of the interests of the elite of the society; therefore, these communities were perceived as an environment of opportunity for community members, thus the lower-class people connected with the elite in a friendly relationship. It was the priority of the upper-class people in these societies not only to erect large buildings that would commemorate their history and names but also to offer opportunities of investment in different responsibility models around the edges and inside buildings as well as accommodations for those who were living in the same district. Some of these opportunities offered were under the permissive agreement of responsibility, such as the building tenants. Others fell under the possessive agreement of responsibility, such as those for the vendors attached to the edges of the buildings. The third type of opportunity, for shop owners on the ground floor, fell within the unified model of responsibility.
This unique mixed-use pattern of work and live in the traditional built environment has been observed in the second case study, EI-Wikala, built by Nafissa El Byydda in 1790s, and in the commercial shops at the ground floor of EI-Mu’aid complex, built during the 1420s (Figure 11). Also, the endowment institution ‘Waqf created this engagement between the inhabitants, elites and ordinary people, which offered opportunities for teaching jobs for the grown-up and educational services for a quarters orphans. This pattern was still in use in the early 20th century and can be observed in the Sabil buildings in the first and second case studies in Figures 9 and 13. In these complex buildings, the jobs and educational opportunities that they offered were significant components that helped the growing feeling of belonging and sense of membership: on one hand, by supporting personal investment, and on the other hand, by people showing that they were willing to defend the whole community and protect it, so that the right to belong emerged. At the end, they were collectively managing their own environment (Bess, Fisher, Sonn, & Bishop, 2002). This situation was explicit during Napoleon’s campaign in Egypt in 1798; the sense of membership and the sense of belonging of these shared places were the fuel of the strongest resistance.

“Work and live” pattern and the right to invest in the edges of the built environment given to the local people in the space of El-Sokaria.
Therefore, it can be argued that connecting people not only in friendly relationships but also in a continuing dialogue is the corner stone of the sense of community which gives the community its dynamicity and livability. This dialogue was an essential strand in the traditional built environment; it helped form the urban code of these historic contexts which played a key role in generating and protecting all sustainability aspects of these communities. This strand also can be seen as a controller of individual’s desire to affect the group or vice versa, forming a communal consciousness and solidarity (Bauman, 2001). The communal consciousness generated shared emotions (Bess et al., 2002), relations, and robust bonds among the community’s members which developed as a kind of common language.
In this context, Kim and Kaplan in 2004 described the shared emotions of these traditional communities as the distinguishing feature that bestowed them their unprecedented and interconnected domains: the place attachment, identity, feeling of ownership, social networking, and pedestrianism. What is more, Mohammed and Mahmoud (2012) describe these four domains contending, These four domains relied on the edges of spaces fostering street side and edge activities. They were hidden elements, particularly in the second and third case studies, which increased the feeling of belonging of residents, who were thus encouraged to make three consequential steps enhancing and emphasising their roles in their built environment: to explore their community; to try and invest in the opportunities available; and then to act. The most suitable places for these three steps to be exercised freely were the edges of spaces. (p. 242)
These three steps are explicit in the second case study, in particular in two areas. The first one is in the northern part of the space where residents used vacant land to gradually erect built-in shops abutting the walls (Figure 12).

Three sequential steps were followed, informally, by residents to transform marketplace into built-in shops: (a) to explore the community, (b) to invest in the opportunities available, and (c) then to act.
The second area is the dead land or no man’s land abutting the edges of the dilapidated walls of the city outside the gate of Bab-Zewila. The vendors and local people transformed this vacant land to a mixed-use building, residential and commercial, called the house of Al-Alyli (Figure 13). As a result, local people changed these two areas from neglected edges to livable, safer, and more walkable areas by bringing life to these edges (Shafer, Lee, & Turner, 2000; Southworth, 2005).

Transformation of the dead edges of the dilapidated walls into livable, “work and live” places through three consequential steps: (a) to invest, the users were vendors possessing this no man’s land by building light structures; (b) the vendors began to gain more rights to control and use by attaching light structure to the old walls informally, applying the principle of “no causing harm to the passers-by”; (c) the authorities intervened by conferring formal ownership on the vendors as an investment of all sources of the area when they realized its economic value.
Discussion: Significance and Contribution to Design Education Through the Fine-Tuning of the Edge Environment
This examination of the mechanism of two types of decision-making in the traditional city contributes to the research area of sustainability in the built environment. It helps researchers read the interlocking relationship between social life and urban processes, clarifying that how these two types of decisions are interconnected in a way that shows the values and principles of peoples and their reflections on the physical form of the city. Reading this balance side-by-side with the different forms of responsibility followed in the environment leads to an understanding of the governing social pattern, language, which represents the unwritten rule of the built form. Consequently, this reading of the social pattern language helps us envision the urban code that regulated the built form. Studying the relationship between social pattern language and spatial organization underlines the significance of the edge environment as a new exploratory and generative concept that sketches out the mutual influence between the ideologies and the values imbedded in the walls of spaces. This mutual influence gives a better insight of the mechanism of this urban code of Middle Eastern Urban contexts. It allows those ideologies and values to be seen and from different perspective, mostly, approaches and schools that are interested in researching the idea of human community between authenticity and modernization.
It can be used to highlight a thorough reading of the regulations that maintained the social and environmental sustainability of the spatial organization of the urban fabric. It may help in explaining the morphology of the lower spaces by illustrating edges’ patterns: how they were managed, controlled, and occupied. In more detail, the approaches imposed top-down were responsible for reshaping the backbone, or the urban structure, of the spatial morphology, conceptualized as the static occupancy of the space. Meanwhile, active occupancy is the concept that describes the unwritten rules and building decisions and initiatives that developed over time by local people through bottom-up process, conventions. These conventions were indispensable to deliver the acts and social processes initiated and operationalized by inhabitants. The application of this concept might contribute to educational process, especially design education and site analysis as a method of reading the mechanism and the reasoning behind the changes that occur to the edges of spaces. This application is performed through an anatomizing process of the spatial form: to address various types of ownership and possession; to distinguish and draw the undetermined zone between the buildings built by official authority known as official walls and local inhabitants’ buildings (Mohammed & Mahmoud, 2012). This helps to establish the edges’ types in the space and to define the design requirements for enhancing the role of human agency of the built environment.
In addition, testing this concept at the spatial walls might give urban planners a tool to help measure scale of livability of urban forms. This approach might include conservation, preservation, and maintenance of authentic urban and social characteristics by restoring and retaining traditional activities that might vanish or recede. Therefore, it may be used as an analytical tool in conservation and upgrading programs.
As a design method, it can be used to highlight the necessity of fine-tuning the edge environment as earful interventions at the walls of spaces. Such interventions can be performed in two stages: first, through the fine-tuning process to bring beneficial change through the management of responsibility agreements, and second, through fine-tuning spatial structures and acts pertained to the way that buildings and spaces are operationalized, used, managed, and controlled.
Therefore, coordination might be needed between professionals and researchers who are interested in urban and design education to pay more attention to the interface of architectural and urban domains and develop new disciplines, perhaps in edge architecture or urban design and other relevant environmental professions, in culturally sensitive settings.
Conclusion
Examination of traditional Middle Eastern contexts has shed light on a robust “building act,” or code-like rules, developed from the social pattern language that was considered the organizer of the developmental process of the urban fabric. The significance of this urban code is the aspect of resilience that was the key factor that maintained the social and environmental sustainability of the built form. It shows strong bonds and integration among the values, rules, believes, and principles of the society and its physical built environment. The loss of such bond in modern development frequently results in a determinant impact on the physicality of the built environment as well as on the well-being of the inhabitants. It has been argued that this urban code is the best example of integration of such ideologies and their physical products and it was shaped in a social pattern language that has generated rules and regulations. These regulations fueled the sustainability of traditional communities by creating a built environment that is socially and environmentally responsive. Reading this social pattern language, urban code, in case studies has helped researchers understand this responsiveness and prioritize its two main aspects of sustainability: social and environmental. It shows that social sustainability is the comprehensive meaning of sustainable community or the umbrella that includes underneath the environmental sustainability, meaning that, social sustainability should be achieved first, then the environmental sustainability emerged as a result of social sustainabilty, the opposite is not true. This priority is explicit in the application of the principal of “no causing harm.”
More importantly, reading this urban code has shown that the balance between decisions, imposed top-down, and the building conventions, initiated bottom-up, was the key generative factor of all aspects of sustainability by developing different types of mutual relations between the static and active occupants of the spatial urban morphology.
These relations took place at the edges of the spatial form. Therefore, the careful reading of the edges’ patterns of spaces gives a clear road map to understand the structure of spatial form and the social pattern hidden underneath. These edges witnessed many types of reciprocal relationships between users of the space and their physical surroundings which created a type of creative tension at the edges that made them more dynamic, livable, and secure than other built-in features of the built form. These edges were a truly active urban form by which the liveliness of a space can be measured, which is why they have been termed an edge environment, a key player in morphological transformation.
Footnotes
Declaration of Conflicting Interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.
