This paper presents an aspect of the ongoing research at the University of Michigan aiming to analyze the status of e-commerce in the construction industry. It identifies impediments and challenges, and research solutions for the identified challenges. The focus is on risk management and legal challenges for e-commerce in construction. Very little, if any, research exists on this area in construction literature. The premise of the argument is that studying the legal aspects and challenges for e-commerce in construction are an essential element to having a strong e-commerce infrastructure. This paper introduces the concept of legal modeling and programming for e-commerce in the construction industry. To present the argument for legal programming, the paper starts by outlining the taxonomy of construction e-commerce risks and introducing the legal risks of doing business through e-commerce in construction. It then looks to the future and considers how to incorporate legal criteria in e-construction applications, design and programming.